diff options
| author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-05-10 22:56:42 +0000 |
|---|---|---|
| committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-05-10 22:56:42 +0000 |
| commit | f2eb5ab7806a62e89b8cb572b1b33b70b83b13ab (patch) | |
| tree | 2d2fc402c1260cdc01ed3c03f1444bc16cff97e1 /samplecode/SamplePath.cpp | |
| parent | cc4dac3dac215dc0dd56f7b30d07cc304671b033 (diff) | |
fix bug where we wrote uninitialized data to the flatten stream for shaders.
Both shader and gradient_shader write matrices to the flatten stream. However, they were
just calling write(&matrix, sizeof(SkMatrix)) and the matrix can contain lazily-computed
function ptrs as part of its internal cache. Thus two matrices that are logically the
same may write different bytes.
This is a problem because picture relies on flattening objects and then using the
flatten stream as a key into its cache. This matrix-write bug effectively kills the
effectiveness of the cache for shaders.
The fix is to write proper read/write functions for matrix (and region btw). These
call through to the existing low-level flatten routines (which just write into a
memory ptr).
git-svn-id: http://skia.googlecode.com/svn/trunk@1290 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SamplePath.cpp')
0 files changed, 0 insertions, 0 deletions
