| 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 if (0 == dtype) { | 302 if (0 == dtype) { |
| 303 SkImageInfo info = SkImageInfo::MakeN32Premul(DEV_W, DEV_H); | 303 SkImageInfo info = SkImageInfo::MakeN32Premul(DEV_W, DEV_H); |
| 304 device.reset(SkBitmapDevice::Create(info)); | 304 device.reset(SkBitmapDevice::Create(info)); |
| 305 } else { | 305 } else { |
| 306 #if SK_SUPPORT_GPU | 306 #if SK_SUPPORT_GPU |
| 307 GrContextFactory::GLContextType type = | 307 GrContextFactory::GLContextType type = |
| 308 static_cast<GrContextFactory::GLContextType>(glCtxType); | 308 static_cast<GrContextFactory::GLContextType>(glCtxType); |
| 309 if (!GrContextFactory::IsRenderingGLContext(type)) { | 309 if (!GrContextFactory::IsRenderingGLContext(type)) { |
| 310 continue; | 310 continue; |
| 311 } | 311 } |
| 312 GrContext* context = factory->get(type); | 312 GrContext* context = factory->get(type, kNone_GrGLStandard); |
| 313 if (NULL == context) { | 313 if (NULL == context) { |
| 314 continue; | 314 continue; |
| 315 } | 315 } |
| 316 GrTextureDesc desc; | 316 GrTextureDesc desc; |
| 317 desc.fFlags = kRenderTarget_GrTextureFlagBit | kNoStencil_GrText
ureFlagBit; | 317 desc.fFlags = kRenderTarget_GrTextureFlagBit | kNoStencil_GrText
ureFlagBit; |
| 318 desc.fWidth = DEV_W; | 318 desc.fWidth = DEV_W; |
| 319 desc.fHeight = DEV_H; | 319 desc.fHeight = DEV_H; |
| 320 desc.fConfig = kSkia8888_GrPixelConfig; | 320 desc.fConfig = kSkia8888_GrPixelConfig; |
| 321 desc.fOrigin = 1 == dtype ? kBottomLeft_GrSurfaceOrigin | 321 desc.fOrigin = 1 == dtype ? kBottomLeft_GrSurfaceOrigin |
| 322 : kTopLeft_GrSurfaceOrigin; | 322 : kTopLeft_GrSurfaceOrigin; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 checkRead(reporter, wkbmp, clippedRect.fLeft, | 386 checkRead(reporter, wkbmp, clippedRect.fLeft, |
| 387 clippedRect.fTop, true, false); | 387 clippedRect.fTop, true, false); |
| 388 } else { | 388 } else { |
| 389 REPORTER_ASSERT(reporter, !success); | 389 REPORTER_ASSERT(reporter, !success); |
| 390 } | 390 } |
| 391 } | 391 } |
| 392 } | 392 } |
| 393 } | 393 } |
| 394 } | 394 } |
| 395 } | 395 } |
| OLD | NEW |