| 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 } | 406 } |
| 407 #if SK_SUPPORT_GPU | 407 #if SK_SUPPORT_GPU |
| 408 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WritePixels_Gpu, reporter, context) { | 408 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WritePixels_Gpu, reporter, context) { |
| 409 for (auto& origin : { kTopLeft_GrSurfaceOrigin, kBottomLeft_GrSurfaceOrigin
}) { | 409 for (auto& origin : { kTopLeft_GrSurfaceOrigin, kBottomLeft_GrSurfaceOrigin
}) { |
| 410 GrSurfaceDesc desc; | 410 GrSurfaceDesc desc; |
| 411 desc.fFlags = kRenderTarget_GrSurfaceFlag; | 411 desc.fFlags = kRenderTarget_GrSurfaceFlag; |
| 412 desc.fWidth = DEV_W; | 412 desc.fWidth = DEV_W; |
| 413 desc.fHeight = DEV_H; | 413 desc.fHeight = DEV_H; |
| 414 desc.fConfig = kSkia8888_GrPixelConfig; | 414 desc.fConfig = kSkia8888_GrPixelConfig; |
| 415 desc.fOrigin = origin; | 415 desc.fOrigin = origin; |
| 416 SkAutoTUnref<GrTexture> texture(context->textureProvider()->createTextur
e(desc, | 416 SkAutoTUnref<GrTexture> texture(context->textureProvider()->createTextur
e(desc, false)); |
| 417
SkBudgeted::kNo)); | |
| 418 SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTargetDirect(texture
->asRenderTarget())); | 417 SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTargetDirect(texture
->asRenderTarget())); |
| 419 test_write_pixels(reporter, surface); | 418 test_write_pixels(reporter, surface); |
| 420 } | 419 } |
| 421 } | 420 } |
| 422 #endif | 421 #endif |
| OLD | NEW |