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

Side by Side Diff: tests/ClearTest.cpp

Issue 1885623002: Make more unit tests run on Vulkan (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 rtKeepAlive->reset(context->textureProvider()->createTexture(desc, SkBudgete d::kYes)); 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 *dc != nullptr; 65 return *dc != nullptr;
66 } 66 }
67 67
68 DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ClearBatch, reporter, ctxInfo) { 68 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ClearBatch, reporter, ctxInfo) {
69 GrContext* context = ctxInfo.fGrContext; 69 GrContext* context = ctxInfo.fGrContext;
70 static const int kW = 10; 70 static const int kW = 10;
71 static const int kH = 10; 71 static const int kH = 10;
72 72
73 SkIRect fullRect = SkIRect::MakeWH(kW, kH); 73 SkIRect fullRect = SkIRect::MakeWH(kW, kH);
74 SkAutoTUnref<GrDrawContext> drawContext; 74 SkAutoTUnref<GrDrawContext> drawContext;
75 SkAutoTUnref<GrSurface> rtKeepAlive; 75 SkAutoTUnref<GrSurface> rtKeepAlive;
76 76
77 // A rectangle that is inset by one on all sides and the 1-pixel wide rectan gles that surround 77 // A rectangle that is inset by one on all sides and the 1-pixel wide rectan gles that surround
78 // it. 78 // it.
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 } 228 }
229 if (!check_rect(drawContext, outerLeftEdge, kColor1, &actualValue, &failX, & failY) || 229 if (!check_rect(drawContext, outerLeftEdge, kColor1, &actualValue, &failX, & failY) ||
230 !check_rect(drawContext, outerTopEdge, kColor1, &actualValue, &failX, &f ailY) || 230 !check_rect(drawContext, outerTopEdge, kColor1, &actualValue, &failX, &f ailY) ||
231 !check_rect(drawContext, outerRightEdge, kColor1, &actualValue, &failX, &failY) || 231 !check_rect(drawContext, outerRightEdge, kColor1, &actualValue, &failX, &failY) ||
232 !check_rect(drawContext, outerBottomEdge, kColor1, &actualValue, &failX, &failY)) { 232 !check_rect(drawContext, outerBottomEdge, kColor1, &actualValue, &failX, &failY)) {
233 ERRORF(reporter, "Expected 0x%08x but got 0x%08x at (%d, %d).", kColor1, actualValue, 233 ERRORF(reporter, "Expected 0x%08x but got 0x%08x at (%d, %d).", kColor1, actualValue,
234 failX, failY); 234 failX, failY);
235 } 235 }
236 } 236 }
237 #endif 237 #endif
OLDNEW
« no previous file with comments | « tests/BitmapCopyTest.cpp ('k') | tests/ClipBoundsTest.cpp » ('j') | tests/Test.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698