skia2/tests
djsollen@google.com 7dade42e6f Always store pixels of mutable bitmaps when recording a SkPicture.
Prior to this CL mutable bitmaps only saved a copy of their pixels
if a flag was set at recording time.  That flag has been removed
and the default behavior when recording a mutable bitmap is to
make a copy of it's pixels. This is the only way to ensure that
the pixels are not manipulated before we playback their contents.

However, enabling this behavior breaks the recording of extracted
bitmaps in SkPicture. This is because we currently cache bitmaps
within a picture based only on their pixelRef. This results in
false positive cache hit when drawing an extracted bitmap as it
shares a pixelRef with its orginating bitmap.  Therefore we must
update the index of the bitmap cache to be both the pixelRef AND
the size and offset of the bitmap using those pixels.

BUG=
TEST=extractbitmap.cpp

Review URL: https://codereview.appspot.com/6439043

git-svn-id: http://skia.googlecode.com/svn/trunk@4809 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-27 15:58:23 +00:00
..
TestXCode/Tests.xcodeproj migrate more legacy unittests into tests/ 2009-03-07 03:39:23 +00:00
AAClipTest.cpp update the nearly_integral calculation to be (a) faster, and (b) to correctly 2012-05-11 20:57:25 +00:00
AnnotationTest.cpp [PDF] Add link annotations. 2012-07-13 20:06:02 +00:00
AtomicTest.cpp Add a skia method to perform an atomic add. 2012-07-16 16:51:28 +00:00
BitmapCopyTest.cpp fix warnings on Mac in tests 2012-06-06 12:03:39 +00:00
BitmapGetColorTest.cpp Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
BitSetTest.cpp Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
BlitRowTest.cpp Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
BlurTest.cpp Remove warnings (trailing \, signed vs unsigned, parenthesization). 2011-10-27 15:27:51 +00:00
CanvasTest.cpp Always store pixels of mutable bitmaps when recording a SkPicture. 2012-07-27 15:58:23 +00:00
ClampRangeTest.cpp Split SkGradientShader into separate files for each gradient subclass. 2012-07-26 20:04:23 +00:00
ClipCacheTest.cpp Move clientID into texture desc 2012-06-07 12:08:45 +00:00
ClipCubicTest.cpp Addressed more Windows compiler complaint issues 2012-04-16 15:50:18 +00:00
ClipperTest.cpp fix warnings on Mac in tests 2012-06-06 12:03:39 +00:00
ClipStackTest.cpp Added ctor to SkClipStack and isEmpty method 2012-07-26 18:39:13 +00:00
ColorFilterTest.cpp Decouple the SkFlattenable from SkReader32/SkWriter32. 2012-04-12 13:24:04 +00:00
ColorTest.cpp Interpolate vertical linear gradients for improved quality. 2012-01-18 21:28:01 +00:00
DataRefTest.cpp remove debugging printfs 2012-07-11 18:55:23 +00:00
DeferredCanvasTest.cpp Make SkDeferredCanvas query SkGPipeWriter for space allocated for bitmaps. 2012-07-26 20:03:32 +00:00
DequeTest.cpp fix for non-Windows-specific compiler error in r4624 2012-07-16 17:19:21 +00:00
DrawBitmapRectTest.cpp Debug Windows compiler complaint fixes 2012-05-14 16:33:36 +00:00
DrawPathTest.cpp add test for http://code.google.com/p/chromium/issues/detail?id=131181 2012-06-15 18:26:04 +00:00
DrawTextTest.cpp Subpixel text 3/8 of a pixel too far to the right. 2012-01-13 15:02:58 +00:00
EmptyPathTest.cpp fix warnings on Mac in tests 2012-06-06 12:03:39 +00:00
FillPathTest.cpp fix warnings on Mac in tests 2012-06-06 12:03:39 +00:00
FlateTest.cpp Fixed Windows compiler complaints 2012-07-10 17:30:58 +00:00
FontHostStreamTest.cpp CreateTypefaceFromStream for GDI. 2012-05-18 19:06:41 +00:00
FontHostTest.cpp Need to apply matrix to advance in generateAdvance (as we already were in generateMetrics) 2012-07-18 13:45:58 +00:00
GeometryTest.cpp fix warnings on Mac in tests 2012-06-06 12:03:39 +00:00
GLInterfaceValidation.cpp Code changes for ANGLE GL interface. .gyp file changes will be delivered later. 2012-03-28 16:19:11 +00:00
GLProgramsTest.cpp Merge GrGpuGLShaders into its parent class, GrGpuGL 2012-05-31 15:07:19 +00:00
GradientTest.cpp extend asAGradient for Conical type (to be implemented by PDF and XPS) 2012-06-07 20:26:47 +00:00
GrMemoryPoolTest.cpp Separated Inst counting from the SK_DEBUG #define (now SK_ENABLE_INST_COUNT) 2012-06-27 19:41:42 +00:00
InfRectTest.cpp speedup SkRect::isFinite() (almost 2x) 2012-05-16 13:35:36 +00:00
MathTest.cpp remove SK_CAN_USE_FLOAT (deprecated) 2012-06-11 21:21:26 +00:00
Matrix44Test.cpp fix warnings on Mac in tests 2012-06-06 12:03:39 +00:00
MatrixTest.cpp Rename the existing flatten(void*) methods. 2012-06-08 18:30:46 +00:00
MemsetTest.cpp change SkChunkAlloc to grow its allocations geometrically (not linearly) 2012-05-17 14:28:11 +00:00
MetaDataTest.cpp Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
PackBitsTest.cpp Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
PaintTest.cpp Addressed more Windows compiler complaint issues 2012-04-16 15:50:18 +00:00
ParsePathTest.cpp fix warnings on Mac in tests 2012-06-06 12:03:39 +00:00
PathCoverageTest.cpp fix warnings on Mac in tests 2012-06-06 12:03:39 +00:00
PathMeasureTest.cpp Fixed Windows compiler complaints 2012-07-10 17:30:58 +00:00
PathTest.cpp explicitly track if a path is finite or not 2012-07-26 15:20:36 +00:00
PDFPrimitivesTest.cpp [PDF] Add link annotations. 2012-07-13 20:06:02 +00:00
PictureUtilsTest.cpp Updated make_filepath test to reflect changes in picture_utils. TBR 2012-07-13 18:43:39 +00:00
PointTest.cpp fix warnings on Mac in tests 2012-06-06 12:03:39 +00:00
PremulAlphaRoundTripTest.cpp GPU device preserves pixel values across read/write/read of unpremul pixel values 2012-02-23 15:39:54 +00:00
QuickRejectTest.cpp Create macro for registering classes for deserialization 2012-03-26 17:57:35 +00:00
Reader32Test.cpp Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
ReadPixelsTest.cpp Turn on read pixels test for raster backend 2012-02-09 13:53:48 +00:00
ReadWriteAlphaTest.cpp Move clientID into texture desc 2012-06-07 12:08:45 +00:00
RefCntTest.cpp add protected method for internal_dispose overrides to jam fRefCnt before 2012-07-23 14:50:38 +00:00
RefDictTest.cpp Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
RegionTest.cpp add more tests for rgn::intersects(rect) 2012-05-02 16:52:12 +00:00
ScalarTest.cpp remove SK_CAN_USE_FLOAT (deprecated) 2012-06-11 21:21:26 +00:00
ShaderOpacityTest.cpp Adding isOpaque method to skia shader classes 2011-12-09 15:48:03 +00:00
Sk64Test.cpp remove SK_CAN_USE_FLOAT (deprecated) 2012-06-11 21:21:26 +00:00
skia_test.cpp check for memory leaks in debug-build 2012-07-22 22:33:05 +00:00
SortTest.cpp add test for SkChecksum 2012-07-09 01:53:07 +00:00
SrcOverTest.cpp Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
StreamTest.cpp add tests for read/writePackedUInt, and fix a bug there. 2011-10-18 11:49:52 +00:00
StringTest.cpp fix warnings on Mac in tests 2012-06-06 12:03:39 +00:00
Test.cpp Move GL-specific include files to their own subdirectory, to better 2012-02-14 15:11:59 +00:00
Test.h Adding more unit testing for SkCanvas and derived classes. 2012-02-22 21:00:42 +00:00
TestClassDef.h Skip test GLPrograms test when GL or Gr context can't be created. 2011-08-24 03:29:11 +00:00
TestSize.cpp Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
TLSTest.cpp Disable TLSTest for now, to work around http://code.google.com/p/skia/issues/detail?id=619 2012-05-31 13:54:51 +00:00
ToUnicode.cpp Fixed Windows compiler complaints 2012-07-10 17:30:58 +00:00
TriangulationTest.cpp Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
UnicodeTest.cpp fix clang compilation warning 2012-03-22 21:29:10 +00:00
UtilsTest.cpp Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
valgrind.supp Close a couple of minor memory leaks, add a valgrind suppression file to 2012-03-15 18:16:39 +00:00
WArrayTest.cpp Fix metrics test to no longer include the cpp. 2012-06-25 17:01:46 +00:00
WritePixelsTest.cpp Disable WritePixelsTest on Android 2012-07-12 19:48:42 +00:00
Writer32Test.cpp Avoid a loop in writeString and writePad by zeroing padding first. 2012-07-24 20:47:55 +00:00
XfermodeTest.cpp fix warnings on Mac in tests 2012-06-06 12:03:39 +00:00