| 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 "SkConfig8888.h" | 10 #include "SkConfig8888.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 for (int glCtxType = 0; glCtxType < glCtxTypeCnt; ++glCtxType) { | 79 for (int glCtxType = 0; glCtxType < glCtxTypeCnt; ++glCtxType) { |
| 80 if (0 == dtype) { | 80 if (0 == dtype) { |
| 81 device.reset(SkBitmapDevice::Create(info)); | 81 device.reset(SkBitmapDevice::Create(info)); |
| 82 } else { | 82 } else { |
| 83 #if SK_SUPPORT_GPU | 83 #if SK_SUPPORT_GPU |
| 84 GrContextFactory::GLContextType type = | 84 GrContextFactory::GLContextType type = |
| 85 static_cast<GrContextFactory::GLContextType>(glCtxType); | 85 static_cast<GrContextFactory::GLContextType>(glCtxType); |
| 86 if (!GrContextFactory::IsRenderingGLContext(type)) { | 86 if (!GrContextFactory::IsRenderingGLContext(type)) { |
| 87 continue; | 87 continue; |
| 88 } | 88 } |
| 89 GrContext* context = factory->get(type); | 89 GrContext* context = factory->get(type, kNone_GrGLStandard); |
| 90 if (NULL == context) { | 90 if (NULL == context) { |
| 91 continue; | 91 continue; |
| 92 } | 92 } |
| 93 | 93 |
| 94 device.reset(SkGpuDevice::Create(context, info, 0)); | 94 device.reset(SkGpuDevice::Create(context, info, 0)); |
| 95 #else | 95 #else |
| 96 continue; | 96 continue; |
| 97 #endif | 97 #endif |
| 98 } | 98 } |
| 99 SkCanvas canvas(device); | 99 SkCanvas canvas(device); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 121 const uint32_t* pixels1 = readBmp1.getAddr32(0, y); | 121 const uint32_t* pixels1 = readBmp1.getAddr32(0, y); |
| 122 const uint32_t* pixels2 = readBmp2.getAddr32(0, y); | 122 const uint32_t* pixels2 = readBmp2.getAddr32(0, y); |
| 123 for (int x = 0; x < 256 && success; ++x) { | 123 for (int x = 0; x < 256 && success; ++x) { |
| 124 REPORTER_ASSERT(reporter, success = pixels1[x] == pixels
2[x]); | 124 REPORTER_ASSERT(reporter, success = pixels1[x] == pixels
2[x]); |
| 125 } | 125 } |
| 126 } | 126 } |
| 127 } | 127 } |
| 128 } | 128 } |
| 129 } | 129 } |
| 130 } | 130 } |
| OLD | NEW |