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

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

Issue 481443002: Add GrResourceCache2. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix leaks Created 6 years, 4 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 | « src/gpu/GrClipMaskManager.h ('k') | src/gpu/GrContext.cpp » ('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 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 fAACache.reset(); 1105 fAACache.reset();
1106 return NULL; 1106 return NULL;
1107 } 1107 }
1108 helper.toTexture(result); 1108 helper.toTexture(result);
1109 1109
1110 fCurrClipMaskType = kAlpha_ClipMaskType; 1110 fCurrClipMaskType = kAlpha_ClipMaskType;
1111 return result; 1111 return result;
1112 } 1112 }
1113 1113
1114 //////////////////////////////////////////////////////////////////////////////// 1114 ////////////////////////////////////////////////////////////////////////////////
1115 void GrClipMaskManager::releaseResources() { 1115 void GrClipMaskManager::purgeResources() {
1116 fAACache.releaseResources(); 1116 fAACache.purgeResources();
1117 } 1117 }
1118 1118
1119 void GrClipMaskManager::setGpu(GrGpu* gpu) { 1119 void GrClipMaskManager::setGpu(GrGpu* gpu) {
1120 fGpu = gpu; 1120 fGpu = gpu;
1121 fAACache.setContext(gpu->getContext()); 1121 fAACache.setContext(gpu->getContext());
1122 } 1122 }
1123 1123
1124 void GrClipMaskManager::adjustPathStencilParams(GrStencilSettings* settings) { 1124 void GrClipMaskManager::adjustPathStencilParams(GrStencilSettings* settings) {
1125 const GrDrawState& drawState = fGpu->getDrawState(); 1125 const GrDrawState& drawState = fGpu->getDrawState();
1126 GrClipMaskManager::StencilClipMode clipMode; 1126 GrClipMaskManager::StencilClipMode clipMode;
(...skipping 11 matching lines...) Expand all
1138 1138
1139 // TODO: dynamically attach a stencil buffer 1139 // TODO: dynamically attach a stencil buffer
1140 int stencilBits = 0; 1140 int stencilBits = 0;
1141 GrStencilBuffer* stencilBuffer = 1141 GrStencilBuffer* stencilBuffer =
1142 drawState.getRenderTarget()->getStencilBuffer(); 1142 drawState.getRenderTarget()->getStencilBuffer();
1143 if (NULL != stencilBuffer) { 1143 if (NULL != stencilBuffer) {
1144 stencilBits = stencilBuffer->bits(); 1144 stencilBits = stencilBuffer->bits();
1145 this->adjustStencilParams(settings, clipMode, stencilBits); 1145 this->adjustStencilParams(settings, clipMode, stencilBits);
1146 } 1146 }
1147 } 1147 }
OLDNEW
« no previous file with comments | « src/gpu/GrClipMaskManager.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698