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

Side by Side Diff: tests/ReadPixelsTest.cpp

Issue 22978012: Split SkDevice into SkBaseDevice and SkBitmapDevice (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Updating to ToT (10994) Created 7 years, 3 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
« no previous file with comments | « tests/PremulAlphaRoundTripTest.cpp ('k') | tests/ReadWriteAlphaTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 }; 304 };
305 305
306 for (int dtype = 0; dtype < 3; ++dtype) { 306 for (int dtype = 0; dtype < 3; ++dtype) {
307 int glCtxTypeCnt = 1; 307 int glCtxTypeCnt = 1;
308 #if SK_SUPPORT_GPU 308 #if SK_SUPPORT_GPU
309 if (0 != dtype) { 309 if (0 != dtype) {
310 glCtxTypeCnt = GrContextFactory::kGLContextTypeCnt; 310 glCtxTypeCnt = GrContextFactory::kGLContextTypeCnt;
311 } 311 }
312 #endif 312 #endif
313 for (int glCtxType = 0; glCtxType < glCtxTypeCnt; ++glCtxType) { 313 for (int glCtxType = 0; glCtxType < glCtxTypeCnt; ++glCtxType) {
314 SkAutoTUnref<SkDevice> device; 314 SkAutoTUnref<SkBaseDevice> device;
315 if (0 == dtype) { 315 if (0 == dtype) {
316 device.reset(new SkDevice(SkBitmap::kARGB_8888_Config, DEV_W, DE V_H, false)); 316 device.reset(new SkBitmapDevice(SkBitmap::kARGB_8888_Config,
317 DEV_W, DEV_H, false));
317 } else { 318 } else {
318 #if SK_SUPPORT_GPU 319 #if SK_SUPPORT_GPU
319 GrContextFactory::GLContextType type = 320 GrContextFactory::GLContextType type =
320 static_cast<GrContextFactory::GLContextType>(glCtxType); 321 static_cast<GrContextFactory::GLContextType>(glCtxType);
321 if (!GrContextFactory::IsRenderingGLContext(type)) { 322 if (!GrContextFactory::IsRenderingGLContext(type)) {
322 continue; 323 continue;
323 } 324 }
324 GrContext* context = factory->get(type); 325 GrContext* context = factory->get(type);
325 if (NULL == context) { 326 if (NULL == context) {
326 continue; 327 continue;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 } 407 }
407 } 408 }
408 } 409 }
409 } 410 }
410 } 411 }
411 } 412 }
412 } 413 }
413 414
414 #include "TestClassDef.h" 415 #include "TestClassDef.h"
415 DEFINE_GPUTESTCLASS("ReadPixels", ReadPixelsTestClass, ReadPixelsTest) 416 DEFINE_GPUTESTCLASS("ReadPixels", ReadPixelsTestClass, ReadPixelsTest)
OLDNEW
« no previous file with comments | « tests/PremulAlphaRoundTripTest.cpp ('k') | tests/ReadWriteAlphaTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698