Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(388)

Side by Side Diff: tests/ClearTest.cpp

Issue 1728093005: Move Budgeted enum out of SkSurface, use in GrTextureProvider (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add aliases for Chrome Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests/BlurTest.cpp ('k') | tests/ClipBoundsTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 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 "Test.h" 8 #include "Test.h"
9 9
10 #if SK_SUPPORT_GPU 10 #if SK_SUPPORT_GPU
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 dc->reset(nullptr); 48 dc->reset(nullptr);
49 } 49 }
50 context->freeGpuResources(); 50 context->freeGpuResources();
51 51
52 GrTextureDesc desc; 52 GrTextureDesc desc;
53 desc.fWidth = w; 53 desc.fWidth = w;
54 desc.fHeight = h; 54 desc.fHeight = h;
55 desc.fConfig = kRGBA_8888_GrPixelConfig; 55 desc.fConfig = kRGBA_8888_GrPixelConfig;
56 desc.fFlags = kRenderTarget_GrSurfaceFlag; 56 desc.fFlags = kRenderTarget_GrSurfaceFlag;
57 57
58 rtKeepAlive->reset(context->textureProvider()->createTexture(desc, true)); 58 rtKeepAlive->reset(context->textureProvider()->createTexture(desc, SkBudgete d::kYes));
59 if (!(*rtKeepAlive)) { 59 if (!(*rtKeepAlive)) {
60 return false; 60 return false;
61 } 61 }
62 GrRenderTarget* rt = (*rtKeepAlive)->asRenderTarget(); 62 GrRenderTarget* rt = (*rtKeepAlive)->asRenderTarget();
63 SkASSERT(rt->getUniqueID() != oldID); 63 SkASSERT(rt->getUniqueID() != oldID);
64 dc->reset(context->drawContext(rt)); 64 dc->reset(context->drawContext(rt));
65 return SkToBool(*dc); 65 return SkToBool(*dc);
66 } 66 }
67 67
68 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ClearBatch, reporter, context) { 68 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ClearBatch, reporter, context) {
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } 227 }
228 if (!check_rect(drawContext, outerLeftEdge, kColor1, &actualValue, &failX, & failY) || 228 if (!check_rect(drawContext, outerLeftEdge, kColor1, &actualValue, &failX, & failY) ||
229 !check_rect(drawContext, outerTopEdge, kColor1, &actualValue, &failX, &f ailY) || 229 !check_rect(drawContext, outerTopEdge, kColor1, &actualValue, &failX, &f ailY) ||
230 !check_rect(drawContext, outerRightEdge, kColor1, &actualValue, &failX, &failY) || 230 !check_rect(drawContext, outerRightEdge, kColor1, &actualValue, &failX, &failY) ||
231 !check_rect(drawContext, outerBottomEdge, kColor1, &actualValue, &failX, &failY)) { 231 !check_rect(drawContext, outerBottomEdge, kColor1, &actualValue, &failX, &failY)) {
232 ERRORF(reporter, "Expected 0x%08x but got 0x%08x at (%d, %d).", kColor1, actualValue, 232 ERRORF(reporter, "Expected 0x%08x but got 0x%08x at (%d, %d).", kColor1, actualValue,
233 failX, failY); 233 failX, failY);
234 } 234 }
235 } 235 }
236 #endif 236 #endif
OLDNEW
« no previous file with comments | « tests/BlurTest.cpp ('k') | tests/ClipBoundsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698