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 "SkCanvas.h" | 8 #include "SkCanvas.h" |
9 #include "SkColorPriv.h" | 9 #include "SkColorPriv.h" |
10 #include "SkMathPriv.h" | 10 #include "SkMathPriv.h" |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 if (0 == dtype) { | 321 if (0 == dtype) { |
322 surface.reset(SkSurface::NewRaster(info)); | 322 surface.reset(SkSurface::NewRaster(info)); |
323 } else { | 323 } else { |
324 #if SK_SUPPORT_GPU | 324 #if SK_SUPPORT_GPU |
325 GrContextFactory::GLContextType type = | 325 GrContextFactory::GLContextType type = |
326 static_cast<GrContextFactory::GLContextType>(glCtxType); | 326 static_cast<GrContextFactory::GLContextType>(glCtxType); |
327 if (!GrContextFactory::IsRenderingGLContext(type)) { | 327 if (!GrContextFactory::IsRenderingGLContext(type)) { |
328 continue; | 328 continue; |
329 } | 329 } |
330 GrContext* context = factory->get(type); | 330 GrContext* context = factory->get(type); |
331 if (NULL == context) { | 331 if (nullptr == context) { |
332 continue; | 332 continue; |
333 } | 333 } |
334 GrSurfaceDesc desc; | 334 GrSurfaceDesc desc; |
335 desc.fFlags = kRenderTarget_GrSurfaceFlag; | 335 desc.fFlags = kRenderTarget_GrSurfaceFlag; |
336 desc.fWidth = DEV_W; | 336 desc.fWidth = DEV_W; |
337 desc.fHeight = DEV_H; | 337 desc.fHeight = DEV_H; |
338 desc.fConfig = kSkia8888_GrPixelConfig; | 338 desc.fConfig = kSkia8888_GrPixelConfig; |
339 desc.fOrigin = 1 == dtype ? kBottomLeft_GrSurfaceOrigin : kTopLe
ft_GrSurfaceOrigin; | 339 desc.fOrigin = 1 == dtype ? kBottomLeft_GrSurfaceOrigin : kTopLe
ft_GrSurfaceOrigin; |
340 SkAutoTUnref<GrTexture> surfaceTexture( | 340 SkAutoTUnref<GrTexture> surfaceTexture( |
341 context->textureProvider()->createTexture(desc, false)); | 341 context->textureProvider()->createTexture(desc, false)); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 check_read(reporter, wkbmp, clippedRect.fLeft, | 433 check_read(reporter, wkbmp, clippedRect.fLeft, |
434 clippedRect.fTop, true, false); | 434 clippedRect.fTop, true, false); |
435 } else { | 435 } else { |
436 REPORTER_ASSERT(reporter, !success); | 436 REPORTER_ASSERT(reporter, !success); |
437 } | 437 } |
438 } | 438 } |
439 } | 439 } |
440 } | 440 } |
441 } | 441 } |
442 } | 442 } |
OLD | NEW |