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

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

Issue 22686002: Implement path cover with nv_path_rendering (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebased to issue 23537028 Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/gpu/GrDrawState.h » ('j') | src/gpu/GrDrawState.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrClipMaskManager.h" 9 #include "GrClipMaskManager.h"
10 #include "GrAAConvexPathRenderer.h" 10 #include "GrAAConvexPathRenderer.h"
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 GrStencilBuffer* stencilBuffer = 827 GrStencilBuffer* stencilBuffer =
828 drawState.getRenderTarget()->getStencilBuffer(); 828 drawState.getRenderTarget()->getStencilBuffer();
829 if (NULL != stencilBuffer) { 829 if (NULL != stencilBuffer) {
830 stencilBits = stencilBuffer->bits(); 830 stencilBits = stencilBuffer->bits();
831 } 831 }
832 832
833 SkASSERT(fGpu->caps()->stencilWrapOpsSupport() || !settings.usesWrapOp()); 833 SkASSERT(fGpu->caps()->stencilWrapOpsSupport() || !settings.usesWrapOp());
834 SkASSERT(fGpu->caps()->twoSidedStencilSupport() || !settings.isTwoSided()); 834 SkASSERT(fGpu->caps()->twoSidedStencilSupport() || !settings.isTwoSided());
835 this->adjustStencilParams(&settings, clipMode, stencilBits); 835 this->adjustStencilParams(&settings, clipMode, stencilBits);
836 fGpu->setStencilSettings(settings); 836 fGpu->setStencilSettings(settings);
837
838 //TODO: this is probably never run due to the early return above.
839 settings = drawState.getStencilPathSettings();
840 this->adjustStencilParams(&settings, clipMode, stencilBits);
841 fGpu->setStencilPathSettings(settings);
837 } 842 }
838 843
839 void GrClipMaskManager::adjustStencilParams(GrStencilSettings* settings, 844 void GrClipMaskManager::adjustStencilParams(GrStencilSettings* settings,
840 StencilClipMode mode, 845 StencilClipMode mode,
841 int stencilBitCnt) { 846 int stencilBitCnt) {
842 SkASSERT(stencilBitCnt > 0); 847 SkASSERT(stencilBitCnt > 0);
843 848
844 if (kModifyClip_StencilClipMode == mode) { 849 if (kModifyClip_StencilClipMode == mode) {
845 // We assume that this clip manager itself is drawing to the GrGpu and 850 // We assume that this clip manager itself is drawing to the GrGpu and
846 // has already setup the correct values. 851 // has already setup the correct values.
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 1010
1006 //////////////////////////////////////////////////////////////////////////////// 1011 ////////////////////////////////////////////////////////////////////////////////
1007 void GrClipMaskManager::releaseResources() { 1012 void GrClipMaskManager::releaseResources() {
1008 fAACache.releaseResources(); 1013 fAACache.releaseResources();
1009 } 1014 }
1010 1015
1011 void GrClipMaskManager::setGpu(GrGpu* gpu) { 1016 void GrClipMaskManager::setGpu(GrGpu* gpu) {
1012 fGpu = gpu; 1017 fGpu = gpu;
1013 fAACache.setContext(gpu->getContext()); 1018 fAACache.setContext(gpu->getContext());
1014 } 1019 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrDrawState.h » ('j') | src/gpu/GrDrawState.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698