|
21 | 21 | #include "include/private/SkColorData.h"
|
22 | 22 | #include "src/core/SkAutoPixmapStorage.h"
|
23 | 23 | #include "src/gpu/GrColor.h"
|
24 |
| -#include "src/gpu/GrDirectContextPriv.h" |
25 | 24 | #include "src/gpu/GrImageInfo.h"
|
26 | 25 | #include "src/gpu/GrRenderTargetContext.h"
|
27 |
| -#include "src/gpu/ops/GrClearOp.h" |
28 | 26 | #include "tests/Test.h"
|
29 | 27 | #include "tools/gpu/GrContextFactory.h"
|
30 | 28 |
|
@@ -241,58 +239,6 @@ static void clear_op_test(skiatest::Reporter* reporter, GrDirectContext* dContex
|
241 | 239 | ERRORF(reporter, "Expected 0x%08x but got 0x%08x at (%d, %d).", kColor1, actualValue,
|
242 | 240 | failX, failY);
|
243 | 241 | }
|
244 |
| - |
245 |
| - // Clear calls need to remain ClearOps for the following combining-tests to work as expected |
246 |
| - if (!dContext->priv().caps()->performColorClearsAsDraws() && |
247 |
| - !dContext->priv().caps()->performStencilClearsAsDraws() && |
248 |
| - !dContext->priv().caps()->performPartialClearsAsDraws()) { |
249 |
| - static constexpr SkIRect kScissorRect = SkIRect::MakeXYWH(1, 1, kW-1, kH-1); |
250 |
| - |
251 |
| - // Try combining a pure-color clear w/ a combined stencil & color clear |
252 |
| - // (re skbug.com/10963) |
253 |
| - { |
254 |
| - rtContext = newRTC(dContext, kW, kH); |
255 |
| - SkASSERT(rtContext); |
256 |
| - |
257 |
| - rtContext->clearStencilClip(kScissorRect, true); |
258 |
| - // This color clear can combine w/ the preceding stencil clear |
259 |
| - rtContext->clear(kScissorRect, SK_PMColor4fWHITE); |
260 |
| - |
261 |
| - // This should combine w/ the prior combined clear and overwrite the color |
262 |
| - rtContext->clear(kScissorRect, SK_PMColor4fBLACK); |
263 |
| - |
264 |
| - GrOpsTask* ops = rtContext->getOpsTask(); |
265 |
| - REPORTER_ASSERT(reporter, ops->numOpChains() == 1); |
266 |
| - |
267 |
| - const GrClearOp& clearOp = ops->getChain(0)->cast<GrClearOp>(); |
268 |
| - |
269 |
| - REPORTER_ASSERT(reporter, clearOp.color() == SK_PMColor4fBLACK); |
270 |
| - REPORTER_ASSERT(reporter, clearOp.stencilInsideMask()); |
271 |
| - } |
272 |
| - |
273 |
| - // Try combining a pure-stencil clear w/ a combined stencil & color clear |
274 |
| - // (re skbug.com/10963) |
275 |
| - { |
276 |
| - rtContext = newRTC(dContext, kW, kH); |
277 |
| - SkASSERT(rtContext); |
278 |
| - |
279 |
| - rtContext->clearStencilClip(kScissorRect, true); |
280 |
| - // This color clear can combine w/ the preceding stencil clear |
281 |
| - rtContext->clear(kScissorRect, SK_PMColor4fWHITE); |
282 |
| - |
283 |
| - // This should combine w/ the prior combined clear and overwrite the 'insideStencilMask' |
284 |
| - // field |
285 |
| - rtContext->clearStencilClip(kScissorRect, false); |
286 |
| - |
287 |
| - GrOpsTask* ops = rtContext->getOpsTask(); |
288 |
| - REPORTER_ASSERT(reporter, ops->numOpChains() == 1); |
289 |
| - |
290 |
| - const GrClearOp& clearOp = ops->getChain(0)->cast<GrClearOp>(); |
291 |
| - |
292 |
| - REPORTER_ASSERT(reporter, clearOp.color() == SK_PMColor4fWHITE); |
293 |
| - REPORTER_ASSERT(reporter, !clearOp.stencilInsideMask()); |
294 |
| - } |
295 |
| - } |
296 | 242 | }
|
297 | 243 |
|
298 | 244 | DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ClearOp, reporter, ctxInfo) {
|
|
0 commit comments