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

Unified Diff: src/gpu/GrStencilBuffer.cpp

Issue 752233002: Revert "Use scratch keys for stencil buffers." (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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/GrStencilBuffer.h ('k') | src/gpu/gl/GrGpuGL.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrStencilBuffer.cpp
diff --git a/src/gpu/GrStencilBuffer.cpp b/src/gpu/GrStencilBuffer.cpp
index 5aa56e07173c58a3bacabc3fa2a5ef475a70ed8a..16b0150a4d45ba7000ee26bb2c2f8e7d4f348e22 100644
--- a/src/gpu/GrStencilBuffer.cpp
+++ b/src/gpu/GrStencilBuffer.cpp
@@ -12,10 +12,14 @@
#include "GrGpu.h"
#include "GrResourceCache2.h"
+void GrStencilBuffer::transferToCache() {
+ this->getGpu()->getContext()->addStencilBuffer(this);
+}
+
namespace {
// we should never have more than one stencil buffer with same combo of (width,height,samplecount)
void gen_cache_id(int width, int height, int sampleCnt, GrCacheID* cacheID) {
- static const GrCacheID::Domain gStencilBufferDomain = GrResourceKey::ScratchDomain();
+ static const GrCacheID::Domain gStencilBufferDomain = GrCacheID::GenerateDomain();
GrCacheID::Key key;
uint32_t* keyData = key.fData32;
keyData[0] = width;
« no previous file with comments | « src/gpu/GrStencilBuffer.h ('k') | src/gpu/gl/GrGpuGL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698