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

Side by Side Diff: src/gpu/GrClipMaskManager.cpp

Issue 1484973002: Disable using dev bounds in Gr clip reduction code. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years 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 | « no previous file | no next file » | 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 2012 Google Inc. 2 * Copyright 2012 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 "GrClipMaskManager.h" 8 #include "GrClipMaskManager.h"
9 #include "GrCaps.h" 9 #include "GrCaps.h"
10 #include "GrDrawingManager.h" 10 #include "GrDrawingManager.h"
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 if (scissor.intersect(clipSpaceRTIBounds)) { 350 if (scissor.intersect(clipSpaceRTIBounds)) {
351 out->fScissorState.set(scissor); 351 out->fScissorState.set(scissor);
352 this->setPipelineBuilderStencil(pipelineBuilder, ars); 352 this->setPipelineBuilderStencil(pipelineBuilder, ars);
353 return true; 353 return true;
354 } 354 }
355 return false; 355 return false;
356 } 356 }
357 case GrClip::kClipStack_ClipType: { 357 case GrClip::kClipStack_ClipType: {
358 clipSpaceRTIBounds.offset(clip.origin()); 358 clipSpaceRTIBounds.offset(clip.origin());
359 SkIRect clipSpaceReduceQueryBounds; 359 SkIRect clipSpaceReduceQueryBounds;
360 if (devBounds) { 360 #define DISABLE_DEV_BOUNDS_FOR_CLIP_REDUCTION 1
361 if (devBounds && !DISABLE_DEV_BOUNDS_FOR_CLIP_REDUCTION) {
361 SkIRect devIBounds = devBounds->roundOut(); 362 SkIRect devIBounds = devBounds->roundOut();
362 devIBounds.offset(clip.origin()); 363 devIBounds.offset(clip.origin());
363 if (!clipSpaceReduceQueryBounds.intersect(clipSpaceRTIBounds, de vIBounds)) { 364 if (!clipSpaceReduceQueryBounds.intersect(clipSpaceRTIBounds, de vIBounds)) {
364 return false; 365 return false;
365 } 366 }
366 } else { 367 } else {
367 clipSpaceReduceQueryBounds = clipSpaceRTIBounds; 368 clipSpaceReduceQueryBounds = clipSpaceRTIBounds;
368 } 369 }
369 GrReducedClip::ReduceClipStack(*clip.clipStack(), 370 GrReducedClip::ReduceClipStack(*clip.clipStack(),
370 clipSpaceReduceQueryBounds, 371 clipSpaceReduceQueryBounds,
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 1146
1146 //////////////////////////////////////////////////////////////////////////////// 1147 ////////////////////////////////////////////////////////////////////////////////
1147 1148
1148 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc ilAttachment, 1149 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc ilAttachment,
1149 GrStencilSettings* settings) { 1150 GrStencilSettings* settings) {
1150 if (stencilAttachment) { 1151 if (stencilAttachment) {
1151 int stencilBits = stencilAttachment->bits(); 1152 int stencilBits = stencilAttachment->bits();
1152 this->adjustStencilParams(settings, fClipMode, stencilBits); 1153 this->adjustStencilParams(settings, fClipMode, stencilBits);
1153 } 1154 }
1154 } 1155 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698