diff options
author | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-29 11:54:56 +0000 |
---|---|---|
committer | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-29 11:54:56 +0000 |
commit | 1f2f338e23789f3eef168dcbd8171a28820ba6c1 (patch) | |
tree | cfa6c68aca1dbad85f6ae0d3e1e616d9dac1369b /tests | |
parent | 3e8466a1520343e2e7d280d9d1f39b2bd048fbb9 (diff) |
Split SkDevice into SkBaseDevice and SkBitmapDevice
https://codereview.chromium.org/22978012/
git-svn-id: http://skia.googlecode.com/svn/trunk@10995 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CanvasTest.cpp | 10 | ||||
-rw-r--r-- | tests/DeferredCanvasTest.cpp | 28 | ||||
-rw-r--r-- | tests/GradientTest.cpp | 8 | ||||
-rw-r--r-- | tests/LayerDrawLooperTest.cpp | 11 | ||||
-rw-r--r-- | tests/PictureTest.cpp | 8 | ||||
-rw-r--r-- | tests/PremulAlphaRoundTripTest.cpp | 10 | ||||
-rw-r--r-- | tests/ReadPixelsTest.cpp | 5 | ||||
-rw-r--r-- | tests/ReadWriteAlphaTest.cpp | 2 | ||||
-rw-r--r-- | tests/TileGridTest.cpp | 34 | ||||
-rw-r--r-- | tests/WritePixelsTest.cpp | 8 |
10 files changed, 64 insertions, 60 deletions
diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp index 26896fc425..24c3348d15 100644 --- a/tests/CanvasTest.cpp +++ b/tests/CanvasTest.cpp @@ -779,7 +779,7 @@ public: SkBitmap deferredStore; createBitmap(&deferredStore, SkBitmap::kARGB_8888_Config, 0xFFFFFFFF); - SkDevice deferredDevice(deferredStore); + SkBitmapDevice deferredDevice(deferredStore); SkAutoTUnref<SkDeferredCanvas> deferredCanvas(SkDeferredCanvas::Create(&deferredDevice)); testStep->setAssertMessageFormat(kDeferredDrawAssertMessageFormat); testStep->draw(deferredCanvas, reporter); @@ -821,7 +821,7 @@ static void TestProxyCanvasStateConsistency( SkBitmap indirectStore; createBitmap(&indirectStore, SkBitmap::kARGB_8888_Config, 0xFFFFFFFF); - SkDevice indirectDevice(indirectStore); + SkBitmapDevice indirectDevice(indirectStore); SkCanvas indirectCanvas(&indirectDevice); SkProxyCanvas proxyCanvas(&indirectCanvas); testStep->setAssertMessageFormat(kProxyDrawAssertMessageFormat); @@ -844,12 +844,12 @@ static void TestNWayCanvasStateConsistency( SkBitmap indirectStore1; createBitmap(&indirectStore1, SkBitmap::kARGB_8888_Config, 0xFFFFFFFF); - SkDevice indirectDevice1(indirectStore1); + SkBitmapDevice indirectDevice1(indirectStore1); SkCanvas indirectCanvas1(&indirectDevice1); SkBitmap indirectStore2; createBitmap(&indirectStore2, SkBitmap::kARGB_8888_Config, 0xFFFFFFFF); - SkDevice indirectDevice2(indirectStore2); + SkBitmapDevice indirectDevice2(indirectStore2); SkCanvas indirectCanvas2(&indirectDevice2); SkISize canvasSize = referenceCanvas.getDeviceSize(); @@ -882,7 +882,7 @@ static void TestOverrideStateConsistency(skiatest::Reporter* reporter, CanvasTestStep* testStep) { SkBitmap referenceStore; createBitmap(&referenceStore, SkBitmap::kARGB_8888_Config, 0xFFFFFFFF); - SkDevice referenceDevice(referenceStore); + SkBitmapDevice referenceDevice(referenceStore); SkCanvas referenceCanvas(&referenceDevice); testStep->setAssertMessageFormat(kCanvasDrawAssertMessageFormat); testStep->draw(&referenceCanvas, reporter); diff --git a/tests/DeferredCanvasTest.cpp b/tests/DeferredCanvasTest.cpp index 15474f5bb4..7593ba877c 100644 --- a/tests/DeferredCanvasTest.cpp +++ b/tests/DeferredCanvasTest.cpp @@ -7,9 +7,9 @@ */ #include "Test.h" #include "SkBitmap.h" +#include "SkBitmapDevice.h" #include "SkBitmapProcShader.h" #include "SkDeferredCanvas.h" -#include "SkDevice.h" #include "SkGradientShader.h" #include "SkShader.h" #include "../src/image/SkSurface_Base.h" @@ -33,7 +33,7 @@ static void TestDeferredCanvasBitmapAccess(skiatest::Reporter* reporter) { SkBitmap store; create(&store, SkBitmap::kARGB_8888_Config, 0xFFFFFFFF); - SkDevice device(store); + SkBitmapDevice device(store); SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(&device)); canvas->clear(0x00000000); @@ -259,7 +259,7 @@ static void TestDeferredCanvasFlush(skiatest::Reporter* reporter) { SkBitmap store; create(&store, SkBitmap::kARGB_8888_Config, 0xFFFFFFFF); - SkDevice device(store); + SkBitmapDevice device(store); SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(&device)); canvas->clear(0x00000000); @@ -279,7 +279,7 @@ static void TestDeferredCanvasFreshFrame(skiatest::Reporter* reporter) { partialRect.setXYWH(SkIntToScalar(0), SkIntToScalar(0), SkIntToScalar(1), SkIntToScalar(1)); create(&store, SkBitmap::kARGB_8888_Config, 0xFFFFFFFF); - SkDevice device(store); + SkBitmapDevice device(store); SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(&device)); // verify that frame is intially fresh @@ -433,9 +433,9 @@ static void TestDeferredCanvasFreshFrame(skiatest::Reporter* reporter) { } } -class MockDevice : public SkDevice { +class MockDevice : public SkBitmapDevice { public: - MockDevice(const SkBitmap& bm) : SkDevice(bm) { + MockDevice(const SkBitmap& bm) : SkBitmapDevice(bm) { fDrawBitmapCallCount = 0; } virtual void drawBitmap(const SkDraw&, const SkBitmap&, @@ -502,7 +502,7 @@ static void TestDeferredCanvasBitmapCaching(skiatest::Reporter* reporter) { SkBitmap store; store.setConfig(SkBitmap::kARGB_8888_Config, 100, 100); store.allocPixels(); - SkDevice device(store); + SkBitmapDevice device(store); NotificationCounter notificationCounter; SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(&device)); canvas->setNotificationClient(¬ificationCounter); @@ -585,7 +585,7 @@ static void TestDeferredCanvasSkip(skiatest::Reporter* reporter) { SkBitmap store; store.setConfig(SkBitmap::kARGB_8888_Config, 100, 100); store.allocPixels(); - SkDevice device(store); + SkBitmapDevice device(store); NotificationCounter notificationCounter; SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(&device)); canvas->setNotificationClient(¬ificationCounter); @@ -606,7 +606,7 @@ static void TestDeferredCanvasBitmapShaderNoLeak(skiatest::Reporter* reporter) { SkBitmap store; store.setConfig(SkBitmap::kARGB_8888_Config, 100, 100); store.allocPixels(); - SkDevice device(store); + SkBitmapDevice device(store); SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(&device)); // test will fail if nbIterations is not in sync with // BITMAPS_TO_KEEP in SkGPipeWrite.cpp @@ -652,7 +652,7 @@ static void TestDeferredCanvasBitmapSizeThreshold(skiatest::Reporter* reporter) // 1 under : should not store the image { - SkDevice device(store); + SkBitmapDevice device(store); SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(&device)); canvas->setBitmapSizeThreshold(39999); canvas->drawBitmap(sourceImage, 0, 0, NULL); @@ -662,7 +662,7 @@ static void TestDeferredCanvasBitmapSizeThreshold(skiatest::Reporter* reporter) // exact value : should store the image { - SkDevice device(store); + SkBitmapDevice device(store); SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(&device)); canvas->setBitmapSizeThreshold(40000); canvas->drawBitmap(sourceImage, 0, 0, NULL); @@ -672,7 +672,7 @@ static void TestDeferredCanvasBitmapSizeThreshold(skiatest::Reporter* reporter) // 1 over : should still store the image { - SkDevice device(store); + SkBitmapDevice device(store); SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(&device)); canvas->setBitmapSizeThreshold(40001); canvas->drawBitmap(sourceImage, 0, 0, NULL); @@ -807,11 +807,11 @@ static void TestDeferredCanvasCreateCompatibleDevice(skiatest::Reporter* reporte SkBitmap store; store.setConfig(SkBitmap::kARGB_8888_Config, 100, 100); store.allocPixels(); - SkDevice device(store); + SkBitmapDevice device(store); NotificationCounter notificationCounter; SkAutoTUnref<SkDeferredCanvas> canvas(SkDeferredCanvas::Create(&device)); canvas->setNotificationClient(¬ificationCounter); - SkAutoTUnref<SkDevice> secondaryDevice(canvas->createCompatibleDevice( + SkAutoTUnref<SkBaseDevice> secondaryDevice(canvas->createCompatibleDevice( SkBitmap::kARGB_8888_Config, 10, 10, device.isOpaque())); SkCanvas secondaryCanvas(secondaryDevice.get()); SkRect rect = SkRect::MakeWH(5, 5); diff --git a/tests/GradientTest.cpp b/tests/GradientTest.cpp index cf8fbee206..24ffb53151 100644 --- a/tests/GradientTest.cpp +++ b/tests/GradientTest.cpp @@ -6,12 +6,12 @@ * found in the LICENSE file. */ #include "Test.h" -#include "SkDevice.h" -#include "SkTemplates.h" -#include "SkShader.h" +#include "SkBitmapDevice.h" #include "SkColorShader.h" #include "SkEmptyShader.h" #include "SkGradientShader.h" +#include "SkShader.h" +#include "SkTemplates.h" struct GradRec { int fColorCount; @@ -146,7 +146,7 @@ static void TestConstantGradient(skiatest::Reporter*) { outBitmap.allocPixels(); SkPaint paint; paint.setShader(s.get()); - SkDevice device(outBitmap); + SkBitmapDevice device(outBitmap); SkCanvas canvas(&device); canvas.drawPaint(paint); SkAutoLockPixels alp(outBitmap); diff --git a/tests/LayerDrawLooperTest.cpp b/tests/LayerDrawLooperTest.cpp index daadc86e54..8b1aa0d934 100644 --- a/tests/LayerDrawLooperTest.cpp +++ b/tests/LayerDrawLooperTest.cpp @@ -6,9 +6,9 @@ */ #include "Test.h" #include "SkBitmap.h" +#include "SkBitmapDevice.h" #include "SkCanvas.h" #include "SkDraw.h" -#include "SkDevice.h" #include "SkLayerDrawLooper.h" #include "SkMatrix.h" #include "SkPaint.h" @@ -19,17 +19,20 @@ namespace { -class FakeDevice : public SkDevice { +class FakeDevice : public SkBitmapDevice { public: - FakeDevice() : SkDevice(SkBitmap::kARGB_8888_Config, 100, 100) { } + FakeDevice() : SkBitmapDevice(SkBitmap::kARGB_8888_Config, 100, 100, false) { } virtual void drawRect(const SkDraw& draw, const SkRect& r, const SkPaint& paint) SK_OVERRIDE { fLastMatrix = *draw.fMatrix; - SkDevice::drawRect(draw, r, paint); + INHERITED::drawRect(draw, r, paint); } SkMatrix fLastMatrix; + +private: + typedef SkBitmapDevice INHERITED; }; } // namespace diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp index f823806d0d..349560b21c 100644 --- a/tests/PictureTest.cpp +++ b/tests/PictureTest.cpp @@ -5,19 +5,19 @@ * found in the LICENSE file. */ #include "Test.h" +#include "SkBitmapDevice.h" #include "SkCanvas.h" #include "SkColorPriv.h" #include "SkData.h" -#include "SkDevice.h" #include "SkError.h" #include "SkPaint.h" #include "SkPicture.h" +#include "SkPictureUtils.h" #include "SkRandom.h" #include "SkRRect.h" #include "SkShader.h" #include "SkStream.h" -#include "SkPictureUtils.h" static void make_bm(SkBitmap* bm, int w, int h, SkColor color, bool immutable) { bm->setConfig(SkBitmap::kARGB_8888_Config, w, h); @@ -556,7 +556,7 @@ static void test_clip_bound_opt(skiatest::Reporter* reporter) { */ class ClipCountingCanvas : public SkCanvas { public: - explicit ClipCountingCanvas(SkDevice* device) + explicit ClipCountingCanvas(SkBaseDevice* device) : SkCanvas(device) , fClipCount(0){ } @@ -599,7 +599,7 @@ static void test_clip_expansion(skiatest::Reporter* reporter) { p.setColor(SK_ColorBLUE); canvas->drawPaint(p); - SkDevice testDevice(SkBitmap::kNo_Config, 10, 10); + SkBitmapDevice testDevice(SkBitmap::kNo_Config, 10, 10); ClipCountingCanvas testCanvas(&testDevice); picture.draw(&testCanvas); diff --git a/tests/PremulAlphaRoundTripTest.cpp b/tests/PremulAlphaRoundTripTest.cpp index 28150d6240..79b32f91cb 100644 --- a/tests/PremulAlphaRoundTripTest.cpp +++ b/tests/PremulAlphaRoundTripTest.cpp @@ -41,7 +41,7 @@ static const SkCanvas::Config8888 gUnpremulConfigs[] = { }; void PremulAlphaRoundTripTest(skiatest::Reporter* reporter, GrContextFactory* factory) { - SkAutoTUnref<SkDevice> device; + SkAutoTUnref<SkBaseDevice> device; for (int dtype = 0; dtype < 2; ++dtype) { int glCtxTypeCnt = 1; @@ -52,10 +52,10 @@ void PremulAlphaRoundTripTest(skiatest::Reporter* reporter, GrContextFactory* fa #endif for (int glCtxType = 0; glCtxType < glCtxTypeCnt; ++glCtxType) { if (0 == dtype) { - device.reset(new SkDevice(SkBitmap::kARGB_8888_Config, - 256, - 256, - false)); + device.reset(new SkBitmapDevice(SkBitmap::kARGB_8888_Config, + 256, + 256, + false)); } else { #if SK_SUPPORT_GPU GrContextFactory::GLContextType type = diff --git a/tests/ReadPixelsTest.cpp b/tests/ReadPixelsTest.cpp index 24f5954efe..9cc10740e8 100644 --- a/tests/ReadPixelsTest.cpp +++ b/tests/ReadPixelsTest.cpp @@ -311,9 +311,10 @@ void ReadPixelsTest(skiatest::Reporter* reporter, GrContextFactory* factory) { } #endif for (int glCtxType = 0; glCtxType < glCtxTypeCnt; ++glCtxType) { - SkAutoTUnref<SkDevice> device; + SkAutoTUnref<SkBaseDevice> device; if (0 == dtype) { - device.reset(new SkDevice(SkBitmap::kARGB_8888_Config, DEV_W, DEV_H, false)); + device.reset(new SkBitmapDevice(SkBitmap::kARGB_8888_Config, + DEV_W, DEV_H, false)); } else { #if SK_SUPPORT_GPU GrContextFactory::GLContextType type = diff --git a/tests/ReadWriteAlphaTest.cpp b/tests/ReadWriteAlphaTest.cpp index 78306693db..8ae936e97b 100644 --- a/tests/ReadWriteAlphaTest.cpp +++ b/tests/ReadWriteAlphaTest.cpp @@ -82,7 +82,7 @@ static void ReadWriteAlphaTest(skiatest::Reporter* reporter, GrContextFactory* f REPORTER_ASSERT(reporter, match); // Now try writing on the single channel texture - SkAutoTUnref<SkDevice> device(new SkGpuDevice(context, texture->asRenderTarget())); + SkAutoTUnref<SkBaseDevice> device(new SkGpuDevice(context, texture->asRenderTarget())); SkCanvas canvas(device); SkPaint paint; diff --git a/tests/TileGridTest.cpp b/tests/TileGridTest.cpp index f4a0af8c8b..ae20cdd810 100644 --- a/tests/TileGridTest.cpp +++ b/tests/TileGridTest.cpp @@ -7,10 +7,10 @@ */ #include "Test.h" +#include "SkBitmapDevice.h" +#include "SkCanvas.h" #include "SkTileGrid.h" #include "SkTileGridPicture.h" -#include "SkCanvas.h" -#include "SkDevice.h" enum Tile { kTopLeft_Tile = 0x1, @@ -24,7 +24,7 @@ enum Tile { namespace { class MockCanvas : public SkCanvas { public: - MockCanvas(SkDevice* device) : SkCanvas(device) + MockCanvas(SkBaseDevice* device) : SkCanvas(device) {} virtual void drawRect(const SkRect& rect, const SkPaint&) @@ -80,14 +80,14 @@ public: // Test parts of top-left tile { - SkDevice device(store); + SkBitmapDevice device(store); MockCanvas mockCanvas(&device); picture.draw(&mockCanvas); REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count()); REPORTER_ASSERT(reporter, rect1 == mockCanvas.fRects[0]); } { - SkDevice device(store); + SkBitmapDevice device(store); MockCanvas mockCanvas(&device); mockCanvas.translate(SkFloatToScalar(-7.99f), SkFloatToScalar(-7.99f)); picture.draw(&mockCanvas); @@ -96,7 +96,7 @@ public: } // Corner overlap { - SkDevice device(store); + SkBitmapDevice device(store); MockCanvas mockCanvas(&device); mockCanvas.translate(SkFloatToScalar(-9.5f), SkFloatToScalar(-9.5f)); picture.draw(&mockCanvas); @@ -106,7 +106,7 @@ public: } // Intersect bottom right tile, but does not overlap rect 2 { - SkDevice device(store); + SkBitmapDevice device(store); MockCanvas mockCanvas(&device); mockCanvas.translate(SkFloatToScalar(-16.0f), SkFloatToScalar(-16.0f)); picture.draw(&mockCanvas); @@ -115,7 +115,7 @@ public: } // Out of bounds queries, snap to border tiles { - SkDevice device(store); + SkBitmapDevice device(store); MockCanvas mockCanvas(&device); mockCanvas.translate(SkFloatToScalar(2.0f), SkFloatToScalar(0.0f)); picture.draw(&mockCanvas); @@ -123,7 +123,7 @@ public: REPORTER_ASSERT(reporter, rect1 == mockCanvas.fRects[0]); } { - SkDevice device(store); + SkBitmapDevice device(store); MockCanvas mockCanvas(&device); mockCanvas.translate(SkFloatToScalar(0.0f), SkFloatToScalar(2.0f)); picture.draw(&mockCanvas); @@ -131,7 +131,7 @@ public: REPORTER_ASSERT(reporter, rect1 == mockCanvas.fRects[0]); } { - SkDevice device(store); + SkBitmapDevice device(store); MockCanvas mockCanvas(&device); mockCanvas.translate(SkFloatToScalar(-22.0f), SkFloatToScalar(-16.0f)); picture.draw(&mockCanvas); @@ -139,7 +139,7 @@ public: REPORTER_ASSERT(reporter, rect2 == mockCanvas.fRects[0]); } { - SkDevice device(store); + SkBitmapDevice device(store); MockCanvas mockCanvas(&device); mockCanvas.translate(SkFloatToScalar(-16.0f), SkFloatToScalar(-22.0f)); picture.draw(&mockCanvas); @@ -185,7 +185,7 @@ public: { // The offset should cancel the top and left borders of the top left tile // So a look-up at interval 0-10 should be grid aligned, - SkDevice device(tileBitmap); + SkBitmapDevice device(tileBitmap); MockCanvas mockCanvas(&device); picture.draw(&mockCanvas); REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count()); @@ -193,7 +193,7 @@ public: } { // Encroaching border by one pixel - SkDevice device(moreThanATileBitmap); + SkBitmapDevice device(moreThanATileBitmap); MockCanvas mockCanvas(&device); picture.draw(&mockCanvas); REPORTER_ASSERT(reporter, 2 == mockCanvas.fRects.count()); @@ -204,7 +204,7 @@ public: // Tile stride is 8 (tileWidth - 2 * border pixels // so translating by 8, should make query grid-aligned // with middle tile. - SkDevice device(tileBitmap); + SkBitmapDevice device(tileBitmap); MockCanvas mockCanvas(&device); mockCanvas.translate(SkIntToScalar(-8), SkIntToScalar(-8)); picture.draw(&mockCanvas); @@ -212,7 +212,7 @@ public: REPORTER_ASSERT(reporter, rect2 == mockCanvas.fRects[0]); } { - SkDevice device(tileBitmap); + SkBitmapDevice device(tileBitmap); MockCanvas mockCanvas(&device); mockCanvas.translate(SkFloatToScalar(-7.9f), SkFloatToScalar(-7.9f)); picture.draw(&mockCanvas); @@ -221,7 +221,7 @@ public: REPORTER_ASSERT(reporter, rect2 == mockCanvas.fRects[1]); } { - SkDevice device(tileBitmap); + SkBitmapDevice device(tileBitmap); MockCanvas mockCanvas(&device); mockCanvas.translate(SkFloatToScalar(-8.1f), SkFloatToScalar(-8.1f)); picture.draw(&mockCanvas); @@ -233,7 +233,7 @@ public: // Regression test for crbug.com/234688 // Once the 2x2 device region is inset by margin, it yields an empty // adjusted region, sitting right on top of the tile boundary. - SkDevice device(tinyBitmap); + SkBitmapDevice device(tinyBitmap); MockCanvas mockCanvas(&device); mockCanvas.translate(SkFloatToScalar(-8.0f), SkFloatToScalar(-8.0f)); picture.draw(&mockCanvas); diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp index 202bfd6abf..3db3a2abe3 100644 --- a/tests/WritePixelsTest.cpp +++ b/tests/WritePixelsTest.cpp @@ -227,7 +227,7 @@ bool checkWrite(skiatest::Reporter* reporter, const SkBitmap& bitmap, int writeX, int writeY, SkCanvas::Config8888 config8888) { - SkDevice* dev = canvas->getDevice(); + SkBaseDevice* dev = canvas->getDevice(); if (!dev) { return false; } @@ -305,7 +305,7 @@ static const CanvasConfig gCanvasConfigs[] = { #endif }; -SkDevice* createDevice(const CanvasConfig& c, GrContext* grCtx) { +SkBaseDevice* createDevice(const CanvasConfig& c, GrContext* grCtx) { switch (c.fDevType) { case kRaster_DevType: { SkBitmap bmp; @@ -320,7 +320,7 @@ SkDevice* createDevice(const CanvasConfig& c, GrContext* grCtx) { SkAutoLockPixels alp(bmp); memset(bmp.getPixels(), DEV_PAD, bmp.getSafeSize()); } - return new SkDevice(bmp); + return new SkBitmapDevice(bmp); } #if SK_SUPPORT_GPU case kGpu_BottomLeft_DevType: @@ -435,7 +435,7 @@ void WritePixelsTest(skiatest::Reporter* reporter, GrContextFactory* factory) { } #endif - SkAutoTUnref<SkDevice> device(createDevice(gCanvasConfigs[i], context)); + SkAutoTUnref<SkBaseDevice> device(createDevice(gCanvasConfigs[i], context)); SkCanvas canvas(device); static const SkCanvas::Config8888 gSrcConfigs[] = { |