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

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

Issue 1781663002: Reenable dev bounds clip reduction (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 | « 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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 if (scissor.intersect(clipSpaceRTIBounds)) { 398 if (scissor.intersect(clipSpaceRTIBounds)) {
399 out->fScissorState.set(scissor); 399 out->fScissorState.set(scissor);
400 this->setPipelineBuilderStencil(pipelineBuilder, ars); 400 this->setPipelineBuilderStencil(pipelineBuilder, ars);
401 return true; 401 return true;
402 } 402 }
403 return false; 403 return false;
404 } 404 }
405 case GrClip::kClipStack_ClipType: { 405 case GrClip::kClipStack_ClipType: {
406 clipSpaceRTIBounds.offset(clip.origin()); 406 clipSpaceRTIBounds.offset(clip.origin());
407 SkIRect clipSpaceReduceQueryBounds; 407 SkIRect clipSpaceReduceQueryBounds;
408 #define DISABLE_DEV_BOUNDS_FOR_CLIP_REDUCTION 1 408 #define DISABLE_DEV_BOUNDS_FOR_CLIP_REDUCTION 0
409 if (devBounds && !DISABLE_DEV_BOUNDS_FOR_CLIP_REDUCTION) { 409 if (devBounds && !DISABLE_DEV_BOUNDS_FOR_CLIP_REDUCTION) {
410 SkIRect devIBounds = devBounds->roundOut(); 410 SkIRect devIBounds = devBounds->roundOut();
411 devIBounds.offset(clip.origin()); 411 devIBounds.offset(clip.origin());
412 if (!clipSpaceReduceQueryBounds.intersect(clipSpaceRTIBounds, de vIBounds)) { 412 if (!clipSpaceReduceQueryBounds.intersect(clipSpaceRTIBounds, de vIBounds)) {
413 return false; 413 return false;
414 } 414 }
415 } else { 415 } else {
416 clipSpaceReduceQueryBounds = clipSpaceRTIBounds; 416 clipSpaceReduceQueryBounds = clipSpaceRTIBounds;
417 } 417 }
418 GrReducedClip::ReduceClipStack(*clip.clipStack(), 418 GrReducedClip::ReduceClipStack(*clip.clipStack(),
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 1154
1155 //////////////////////////////////////////////////////////////////////////////// 1155 ////////////////////////////////////////////////////////////////////////////////
1156 1156
1157 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc ilAttachment, 1157 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc ilAttachment,
1158 GrStencilSettings* settings) { 1158 GrStencilSettings* settings) {
1159 if (stencilAttachment) { 1159 if (stencilAttachment) {
1160 int stencilBits = stencilAttachment->bits(); 1160 int stencilBits = stencilAttachment->bits();
1161 this->adjustStencilParams(settings, fClipMode, stencilBits); 1161 this->adjustStencilParams(settings, fClipMode, stencilBits);
1162 } 1162 }
1163 } 1163 }
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