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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 #if SK_SUPPORT_GPU | 408 #if SK_SUPPORT_GPU |
409 DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(WritePixels_Gpu, reporter, ctxInfo) { | 409 DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(WritePixels_Gpu, reporter, ctxInfo) { |
410 for (auto& origin : { kTopLeft_GrSurfaceOrigin, kBottomLeft_GrSurfaceOrigin
}) { | 410 for (auto& origin : { kTopLeft_GrSurfaceOrigin, kBottomLeft_GrSurfaceOrigin
}) { |
411 GrSurfaceDesc desc; | 411 GrSurfaceDesc desc; |
412 desc.fFlags = kRenderTarget_GrSurfaceFlag; | 412 desc.fFlags = kRenderTarget_GrSurfaceFlag; |
413 desc.fWidth = DEV_W; | 413 desc.fWidth = DEV_W; |
414 desc.fHeight = DEV_H; | 414 desc.fHeight = DEV_H; |
415 desc.fConfig = kSkia8888_GrPixelConfig; | 415 desc.fConfig = kSkia8888_GrPixelConfig; |
416 desc.fOrigin = origin; | 416 desc.fOrigin = origin; |
417 SkAutoTUnref<GrTexture> texture( | 417 SkAutoTUnref<GrTexture> texture( |
418 ctxInfo.fGrContext->textureProvider()->createTexture(desc, SkBudgete
d::kNo)); | 418 ctxInfo.grContext()->textureProvider()->createTexture(desc, SkBudget
ed::kNo)); |
419 auto surface(SkSurface::MakeRenderTargetDirect(texture->asRenderTarget()
)); | 419 auto surface(SkSurface::MakeRenderTargetDirect(texture->asRenderTarget()
)); |
420 test_write_pixels(reporter, surface.get()); | 420 test_write_pixels(reporter, surface.get()); |
421 } | 421 } |
422 } | 422 } |
423 #endif | 423 #endif |
OLD | NEW |