Skip to content

Instantly share code, notes, and snippets.

diff --git a/src/core/SkImageCacherator.cpp b/src/core/SkImageCacherator.cpp
index 9074924..767900c 100644
--- a/src/core/SkImageCacherator.cpp
+++ b/src/core/SkImageCacherator.cpp
@@ -81,6 +81,29 @@ static bool check_output_bitmap(const SkBitmap& bitmap, uint32_t expectedID) {
return true;
}
+#define SKGR_DEBUG
+#ifdef SKGR_DEBUG
@astojilj
astojilj / Issue 507273 measurements.patch
Created January 12, 2016 09:48
Issue 507273 measurements patch
diff --git a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp
index 09f931b..a9a80e0 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp
@@ -294,7 +294,7 @@ SkBitmap ImageFrameGenerator::tryToResumeDecode(size_t index, const SkISize& sca
if (*it)
decodedFrameCount++;
}
- removeDecoder = m_frameCount && (decodedFrameCount == m_frameCount);
+ removeDecoder = m_frameCount && (decodedFrameCount == m_frameCount) && (index == m_frameCount - 1);
@astojilj
astojilj / gist:1af61eac21878a386c86
Last active January 12, 2016 09:46
Issue 507273 fix
Before - total on decoding:3019ms
After - total on decoding: 909ms
Trace before the patch
======================
I/GFXGIF (14754): took 3.968385ms for 512*384 frame 1 depends on 0
I/ GFX(14754): decoding frame 2
I/GFXGIF (14754): took 4.166769ms for 512*384 frame 2 depends on 1
I/ GFX(14754): decoding frame 3
I/GFXGIF (14754): took 7.444692ms for 512*384 frame 3 depends on 2
@astojilj
astojilj / 1-2-2-2-3.patch
Created January 4, 2016 21:25
1-2-2-2-3.patch
I/GFX 1 ( 4299): took 0.001461ms for 2320*1024 texture 4
I/GFX 2_1 ( 4299): took 0.384077ms for 2320*1024 texture 4
I/GFX 2_2 ( 4299): took 0.001077ms for 2320*1024 texture 4
I/GFX 2_3 ( 4299): took 0.000538ms for 2320*1024 texture 4
I/GFX 3 ( 4299): took 0.007846ms for 2320*1024 texture 4
I/GFX 1 ( 4299): took 0.001616ms for 192*192 texture 4
I/GFX 2_1 ( 4299): took 0.025153ms for 192*192 texture 4
I/GFX 2_2 ( 4299): took 0.000769ms for 192*192 texture 4
I/GFX 2_3 ( 4299): took 0.000616ms for 192*192 texture 4
I/GFX 3 ( 4299): took 0.006461ms for 192*192 texture 4
@astojilj
astojilj / 1-2-3.patch
Last active January 4, 2016 20:58
1-2-3.patch
I/GFX 1 ( 3269): took 0.001615ms for 2320*1024 texture 4
I/GFX 2 ( 3269): took 0.631077ms for 2320*1024 texture 4
I/GFX 3 ( 3269): took 0.008846ms for 2320*1024 texture 4
I/GFX 1 ( 3269): took 0.001693ms for 192*192 texture 4
I/GFX 2 ( 3269): took 0.068923ms for 192*192 texture 4
I/GFX 3 ( 3269): took 0.007769ms for 192*192 texture 4
I/GFX 1 ( 3269): took 0.002769ms for 192*192 texture 4
I/GFX 2 ( 3269): took 0.014462ms for 192*192 texture 4
I/GFX 3 ( 3269): took 0.008308ms for 192*192 texture 4
I/GFX 1 ( 3269): took 0.001769ms for 48*48 texture 4
I/GFX all before(20523): took 0.172307ms for 2320*1024 texture 4
I/GFX all before(20523): took 0.099000ms for 2320*1024 texture 4
I/GFX all before(20523): took 0.437923ms for 2320*1024 texture 4
I/GFX all before(20523): took 0.314308ms for 2320*1024 texture 4
I/GFX all before(20523): took 0.028307ms for 192*192 texture 4
I/GFX all before(20523): took 0.016385ms for 192*192 texture 4
I/GFX all before(20523): took 0.015308ms for 48*48 texture 4
I/GFX all before(20523): took 0.019923ms for 192*192 texture 4
I/GFX all before(20523): took 0.050385ms for 192*192 texture 4
@astojilj
astojilj / measurement.with.patch
Last active December 24, 2015 11:37
measurement with patch
I/GFX all (18555): took 0.001231ms for 2320*1024 texture 4
I/GFX all (18555): took 0.001154ms for 192*192 texture 4
I/GFX all (18555): took 0.001384ms for 192*192 texture 4
I/GFX all (18555): took 0.001384ms for 48*48 texture 4
I/GFX all (18555): took 0.001385ms for 192*192 texture 4
I/GFX all (18555): took 0.001154ms for 192*192 texture 4
I/GFX all (18555): took 0.001076ms for 192*192 texture 4
I/GFX all (18555): took 0.001231ms for 2320*1024 texture 4
I/GFX all (18555): took 0.001770ms for 2320*1024 texture 4
I/GFX all (18555): took 0.001385ms for 2320*1024 texture 4