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

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

Issue 981723009: Revert "Don't require AA in order to use shader-based clips" (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 "GrAAConvexPathRenderer.h" 9 #include "GrAAConvexPathRenderer.h"
10 #include "GrAAHairLinePathRenderer.h" 10 #include "GrAAHairLinePathRenderer.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 // diff RR 285 // diff RR
286 // isect convex_poly 286 // isect convex_poly
287 // isect convex_poly 287 // isect convex_poly
288 // when drawing rounded div borders. This could probably be tuned based on a 288 // when drawing rounded div borders. This could probably be tuned based on a
289 // configuration's relative costs of switching RTs to generate a mask vs 289 // configuration's relative costs of switching RTs to generate a mask vs
290 // longer shaders. 290 // longer shaders.
291 if (elements.count() <= 4) { 291 if (elements.count() <= 4) {
292 SkVector clipToRTOffset = { SkIntToScalar(-clip.origin().fX), 292 SkVector clipToRTOffset = { SkIntToScalar(-clip.origin().fX),
293 SkIntToScalar(-clip.origin().fY) }; 293 SkIntToScalar(-clip.origin().fY) };
294 if (elements.isEmpty() || 294 if (elements.isEmpty() ||
295 this->installClipEffects(pipelineBuilder, arfp, elements, clipToRTOf fset, devBounds)) { 295 (requiresAA && this->installClipEffects(pipelineBuilder, arfp, eleme nts, clipToRTOffset,
296 devBounds))) {
296 SkIRect scissorSpaceIBounds(clipSpaceIBounds); 297 SkIRect scissorSpaceIBounds(clipSpaceIBounds);
297 scissorSpaceIBounds.offset(-clip.origin()); 298 scissorSpaceIBounds.offset(-clip.origin());
298 if (NULL == devBounds || 299 if (NULL == devBounds ||
299 !SkRect::Make(scissorSpaceIBounds).contains(*devBounds)) { 300 !SkRect::Make(scissorSpaceIBounds).contains(*devBounds)) {
300 scissorState->set(scissorSpaceIBounds); 301 scissorState->set(scissorSpaceIBounds);
301 } 302 }
302 this->setPipelineBuilderStencil(pipelineBuilder, ars); 303 this->setPipelineBuilderStencil(pipelineBuilder, ars);
303 return true; 304 return true;
304 } 305 }
305 } 306 }
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 fAACache.setContext(clipTarget->getContext()); 1122 fAACache.setContext(clipTarget->getContext());
1122 } 1123 }
1123 1124
1124 void GrClipMaskManager::adjustPathStencilParams(const GrStencilBuffer* stencilBu ffer, 1125 void GrClipMaskManager::adjustPathStencilParams(const GrStencilBuffer* stencilBu ffer,
1125 GrStencilSettings* settings) { 1126 GrStencilSettings* settings) {
1126 if (stencilBuffer) { 1127 if (stencilBuffer) {
1127 int stencilBits = stencilBuffer->bits(); 1128 int stencilBits = stencilBuffer->bits();
1128 this->adjustStencilParams(settings, fClipMode, stencilBits); 1129 this->adjustStencilParams(settings, fClipMode, stencilBits);
1129 } 1130 }
1130 } 1131 }
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