diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-02-16 00:59:25 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-02-16 00:59:25 +0000 |
commit | 15a140599942f70e47380e3f700a825c7cece3b4 (patch) | |
tree | 58bd83fb723b2766d078c93eb947bedf055f391a /tests/PremulAlphaRoundTripTest.cpp | |
parent | a3b532743dbb1d54a4c17a2574083ef93c949d50 (diff) |
Change device factories to take SkImageInfo instead of SkBitmap::Config
patch from issue 167033002
BUG=skia:
R=reed@google.com
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/168653002
git-svn-id: http://skia.googlecode.com/svn/trunk@13463 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/PremulAlphaRoundTripTest.cpp')
-rw-r--r-- | tests/PremulAlphaRoundTripTest.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/PremulAlphaRoundTripTest.cpp b/tests/PremulAlphaRoundTripTest.cpp index 5e8e8bf1dd..488d93e19d 100644 --- a/tests/PremulAlphaRoundTripTest.cpp +++ b/tests/PremulAlphaRoundTripTest.cpp @@ -36,6 +36,8 @@ static const SkCanvas::Config8888 gUnpremulConfigs[] = { }; DEF_GPUTEST(PremulAlphaRoundTrip, reporter, factory) { + const SkImageInfo info = SkImageInfo::MakeN32Premul(256, 256); + SkAutoTUnref<SkBaseDevice> device; for (int dtype = 0; dtype < 2; ++dtype) { @@ -47,10 +49,7 @@ DEF_GPUTEST(PremulAlphaRoundTrip, reporter, factory) { #endif for (int glCtxType = 0; glCtxType < glCtxTypeCnt; ++glCtxType) { if (0 == dtype) { - device.reset(new SkBitmapDevice(SkBitmap::kARGB_8888_Config, - 256, - 256, - false)); + device.reset(SkBitmapDevice::Create(info)); } else { #if SK_SUPPORT_GPU GrContextFactory::GLContextType type = @@ -63,7 +62,7 @@ DEF_GPUTEST(PremulAlphaRoundTrip, reporter, factory) { continue; } - device.reset(new SkGpuDevice(context, SkBitmap::kARGB_8888_Config, 256, 256)); + device.reset(SkGpuDevice::Create(context, info, 0)); #else continue; #endif |