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

Unified Diff: src/gpu/GrRenderTarget.cpp

Issue 14864020: Don't call purgeCache() from within GrResource memebers. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrResourceCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrRenderTarget.cpp
diff --git a/src/gpu/GrRenderTarget.cpp b/src/gpu/GrRenderTarget.cpp
index 5630d58297ac2419e8134fd443b472683697d478..1cbd5f5e840d5f34d3d973cb7468ae421abb5877 100644
--- a/src/gpu/GrRenderTarget.cpp
+++ b/src/gpu/GrRenderTarget.cpp
@@ -95,28 +95,7 @@ void GrRenderTarget::overrideResolveRect(const GrIRect rect) {
}
void GrRenderTarget::setStencilBuffer(GrStencilBuffer* stencilBuffer) {
- if (stencilBuffer == fStencilBuffer) {
- return;
- }
-
- if (NULL != fStencilBuffer) {
- fStencilBuffer->unref();
-
- GrContext* context = this->getContext();
- if (NULL != context) {
- context->purgeCache();
- }
-
- if (NULL != context) {
- context->purgeCache();
- }
- }
-
- fStencilBuffer = stencilBuffer;
-
- if (NULL != fStencilBuffer) {
- fStencilBuffer->ref();
- }
+ SkRefCnt_SafeAssign(fStencilBuffer, stencilBuffer);
}
void GrRenderTarget::onRelease() {
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrResourceCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698