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

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: fix a comment Created 7 years, 2 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 | « src/gpu/GrClipMaskManager.h ('k') | src/gpu/GrDrawTarget.h » ('j') | 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 /* 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 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 1005
1006 //////////////////////////////////////////////////////////////////////////////// 1006 ////////////////////////////////////////////////////////////////////////////////
1007 void GrClipMaskManager::releaseResources() { 1007 void GrClipMaskManager::releaseResources() {
1008 fAACache.releaseResources(); 1008 fAACache.releaseResources();
1009 } 1009 }
1010 1010
1011 void GrClipMaskManager::setGpu(GrGpu* gpu) { 1011 void GrClipMaskManager::setGpu(GrGpu* gpu) {
1012 fGpu = gpu; 1012 fGpu = gpu;
1013 fAACache.setContext(gpu->getContext()); 1013 fAACache.setContext(gpu->getContext());
1014 } 1014 }
1015
1016 void GrClipMaskManager::adjustPathStencilParams(GrStencilSettings* settings) {
1017 const GrDrawState& drawState = fGpu->getDrawState();
1018 GrClipMaskManager::StencilClipMode clipMode;
1019 if (this->isClipInStencil() && drawState.isClipState()) {
1020 clipMode = GrClipMaskManager::kRespectClip_StencilClipMode;
1021 // We can't be modifying the clip and respecting it at the same time.
1022 SkASSERT(!drawState.isStateFlagEnabled(
1023 GrGpu::kModifyStencilClip_StateBit));
1024 } else if (drawState.isStateFlagEnabled(
1025 GrGpu::kModifyStencilClip_StateBit)) {
1026 clipMode = GrClipMaskManager::kModifyClip_StencilClipMode;
1027 } else {
1028 clipMode = GrClipMaskManager::kIgnoreClip_StencilClipMode;
1029 }
1030
1031 // TODO: dynamically attach a stencil buffer
1032 int stencilBits = 0;
1033 GrStencilBuffer* stencilBuffer =
1034 drawState.getRenderTarget()->getStencilBuffer();
1035 if (NULL != stencilBuffer) {
1036 stencilBits = stencilBuffer->bits();
1037 this->adjustStencilParams(settings, clipMode, stencilBits);
1038 }
1039 }
1040
OLDNEW
« no previous file with comments | « src/gpu/GrClipMaskManager.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698