OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkBitmapDevice.h" | 8 #include "SkBitmapDevice.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 #endif | 412 #endif |
413 for (int glCtxType = 0; glCtxType < glCtxTypeCnt; ++glCtxType) { | 413 for (int glCtxType = 0; glCtxType < glCtxTypeCnt; ++glCtxType) { |
414 GrContext* context = NULL; | 414 GrContext* context = NULL; |
415 #if SK_SUPPORT_GPU | 415 #if SK_SUPPORT_GPU |
416 if (isGPUDevice) { | 416 if (isGPUDevice) { |
417 GrContextFactory::GLContextType type = | 417 GrContextFactory::GLContextType type = |
418 static_cast<GrContextFactory::GLContextType>(glCtxType); | 418 static_cast<GrContextFactory::GLContextType>(glCtxType); |
419 if (!GrContextFactory::IsRenderingGLContext(type)) { | 419 if (!GrContextFactory::IsRenderingGLContext(type)) { |
420 continue; | 420 continue; |
421 } | 421 } |
422 context = factory->get(type); | 422 context = factory->get(type, kNone_GrGLStandard); |
423 if (NULL == context) { | 423 if (NULL == context) { |
424 continue; | 424 continue; |
425 } | 425 } |
426 } | 426 } |
427 #endif | 427 #endif |
428 | 428 |
429 SkAutoTUnref<SkBaseDevice> device(createDevice(gCanvasConfigs[i], co
ntext)); | 429 SkAutoTUnref<SkBaseDevice> device(createDevice(gCanvasConfigs[i], co
ntext)); |
430 SkCanvas canvas(device); | 430 SkCanvas canvas(device); |
431 | 431 |
432 static const struct { | 432 static const struct { |
(...skipping 29 matching lines...) Expand all Loading... |
462 SkIRect writeRect = SkIRect::MakeXYWH(rect.fLeft, rect.f
Top, | 462 SkIRect writeRect = SkIRect::MakeXYWH(rect.fLeft, rect.f
Top, |
463 bmp.width(), bmp.h
eight()); | 463 bmp.width(), bmp.h
eight()); |
464 bool intersects = SkIRect::Intersects(canvasRect, writeR
ect) ; | 464 bool intersects = SkIRect::Intersects(canvasRect, writeR
ect) ; |
465 REPORTER_ASSERT(reporter, intersects == (idBefore != idA
fter)); | 465 REPORTER_ASSERT(reporter, intersects == (idBefore != idA
fter)); |
466 } | 466 } |
467 } | 467 } |
468 } | 468 } |
469 } | 469 } |
470 } | 470 } |
471 } | 471 } |
OLD | NEW |