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

Side by Side Diff: tests/PremulAlphaRoundTripTest.cpp

Issue 22978012: Split SkDevice into SkBaseDevice and SkBitmapDevice (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Moved code around to make code review easier Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "Test.h" 9 #include "Test.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 for (int dtype = 0; dtype < 2; ++dtype) { 45 for (int dtype = 0; dtype < 2; ++dtype) {
46 46
47 int glCtxTypeCnt = 1; 47 int glCtxTypeCnt = 1;
48 #if SK_SUPPORT_GPU 48 #if SK_SUPPORT_GPU
49 if (0 != dtype) { 49 if (0 != dtype) {
50 glCtxTypeCnt = GrContextFactory::kGLContextTypeCnt; 50 glCtxTypeCnt = GrContextFactory::kGLContextTypeCnt;
51 } 51 }
52 #endif 52 #endif
53 for (int glCtxType = 0; glCtxType < glCtxTypeCnt; ++glCtxType) { 53 for (int glCtxType = 0; glCtxType < glCtxTypeCnt; ++glCtxType) {
54 if (0 == dtype) { 54 if (0 == dtype) {
55 device.reset(new SkDevice(SkBitmap::kARGB_8888_Config, 55 device.reset(new SkRasterDevice(SkBitmap::kARGB_8888_Config,
56 256, 56 256,
57 256, 57 256,
58 false)); 58 false));
59 } else { 59 } else {
60 #if SK_SUPPORT_GPU 60 #if SK_SUPPORT_GPU
61 GrContextFactory::GLContextType type = 61 GrContextFactory::GLContextType type =
62 static_cast<GrContextFactory::GLContextType>(glCtxType); 62 static_cast<GrContextFactory::GLContextType>(glCtxType);
63 if (!GrContextFactory::IsRenderingGLContext(type)) { 63 if (!GrContextFactory::IsRenderingGLContext(type)) {
64 continue; 64 continue;
65 } 65 }
66 GrContext* context = factory->get(type); 66 GrContext* context = factory->get(type);
67 if (NULL == context) { 67 if (NULL == context) {
68 continue; 68 continue;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 } 112 }
113 } 113 }
114 } 114 }
115 } 115 }
116 } 116 }
117 } 117 }
118 118
119 #include "TestClassDef.h" 119 #include "TestClassDef.h"
120 DEFINE_GPUTESTCLASS("PremulAlphaRoundTripTest", PremulAlphaRoundTripTestClass, P remulAlphaRoundTripTest) 120 DEFINE_GPUTESTCLASS("PremulAlphaRoundTripTest", PremulAlphaRoundTripTestClass, P remulAlphaRoundTripTest)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698