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

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

Issue 1001503002: Implement support for mixed sampled render targets (Closed) Base URL: https://skia.googlesource.com/skia.git@mix1
Patch Set: Address comments Created 5 years, 6 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 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 if (NULL == devBounds || 299 if (NULL == devBounds ||
300 !SkRect::Make(scissorSpaceIBounds).contains(*devBounds)) { 300 !SkRect::Make(scissorSpaceIBounds).contains(*devBounds)) {
301 scissorState->set(scissorSpaceIBounds); 301 scissorState->set(scissorSpaceIBounds);
302 } 302 }
303 this->setPipelineBuilderStencil(pipelineBuilder, ars); 303 this->setPipelineBuilderStencil(pipelineBuilder, ars);
304 return true; 304 return true;
305 } 305 }
306 } 306 }
307 307
308 // If MSAA is enabled we can do everything in the stencil buffer. 308 // If MSAA is enabled we can do everything in the stencil buffer.
309 if (0 == rt->numSamples() && requiresAA) { 309 if (0 == rt->numColorSamples() && requiresAA) {
310 GrTexture* result = NULL; 310 GrTexture* result = NULL;
311 311
312 // The top-left of the mask corresponds to the top-left corner of the bo unds. 312 // The top-left of the mask corresponds to the top-left corner of the bo unds.
313 SkVector clipToMaskOffset = { 313 SkVector clipToMaskOffset = {
314 SkIntToScalar(-clipSpaceIBounds.fLeft), 314 SkIntToScalar(-clipSpaceIBounds.fLeft),
315 SkIntToScalar(-clipSpaceIBounds.fTop) 315 SkIntToScalar(-clipSpaceIBounds.fTop)
316 }; 316 };
317 317
318 if (this->useSWOnlyPath(pipelineBuilder, clipToMaskOffset, elements)) { 318 if (this->useSWOnlyPath(pipelineBuilder, clipToMaskOffset, elements)) {
319 // The clip geometry is complex enough that it will be more efficien t to create it 319 // The clip geometry is complex enough that it will be more efficien t to create it
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 fAACache.purgeResources(); 1119 fAACache.purgeResources();
1120 } 1120 }
1121 1121
1122 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc ilAttachment, 1122 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc ilAttachment,
1123 GrStencilSettings* settings) { 1123 GrStencilSettings* settings) {
1124 if (stencilAttachment) { 1124 if (stencilAttachment) {
1125 int stencilBits = stencilAttachment->bits(); 1125 int stencilBits = stencilAttachment->bits();
1126 this->adjustStencilParams(settings, fClipMode, stencilBits); 1126 this->adjustStencilParams(settings, fClipMode, stencilBits);
1127 } 1127 }
1128 } 1128 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698