| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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) |
| OLD | NEW |