Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2197)

Unified Diff: tests/PremulAlphaRoundTripTest.cpp

Issue 168653002: Change device factories to take SkImageInfo instead of SkBitmap::Config (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix PdfViewer Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/LayerDrawLooperTest.cpp ('k') | tests/ReadPixelsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PremulAlphaRoundTripTest.cpp
diff --git a/tests/PremulAlphaRoundTripTest.cpp b/tests/PremulAlphaRoundTripTest.cpp
index 5e8e8bf1dd42843b8db5d9905b4812e1e4106f72..488d93e19d32d36d067c1e3d1724876da97962e9 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
« no previous file with comments | « tests/LayerDrawLooperTest.cpp ('k') | tests/ReadPixelsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698