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

Unified Diff: src/gpu/GrStencil.cpp

Issue 1816153002: Set up cache in vulkan to reuse GrVkPrograms (aka VkPipelines) (Closed) Base URL: https://skia.googlesource.com/skia.git@progSamplers
Patch Set: cleanup Created 4 years, 9 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
Index: src/gpu/GrStencil.cpp
diff --git a/src/gpu/GrStencil.cpp b/src/gpu/GrStencil.cpp
index f37aa317ec37b20f9ff0f731278ab27dedc8bf66..79bce9940ba8b23c6712a356a117cb50af3d2a4c 100644
--- a/src/gpu/GrStencil.cpp
+++ b/src/gpu/GrStencil.cpp
@@ -9,6 +9,8 @@
#include "GrStencil.h"
+#include "GrProcessor.h"
+
////////////////////////////////////////////////////////////////////////////////
// Stencil Rules for Merging user stencil space into clip
@@ -393,3 +395,9 @@ bool GrStencilSettings::GetClipPasses(
}
return false;
}
+
+void GrStencilSettings::genKey(GrProcessorKeyBuilder* b) const {
+ SkASSERT(sizeof(GrStencilSettings) <= 6 * sizeof(uint32_t));
bsalomon 2016/03/22 14:00:33 How about static const int kCount = sizeof(GrSten
egdaniel 2016/03/22 20:06:14 Done. He does do a memset to zero in ctor. In gene
+ uint32_t* key = b->add32n(6);
+ memcpy(key, this, sizeof(GrStencilSettings));
+}
« no previous file with comments | « src/gpu/GrStencil.h ('k') | src/gpu/gl/GrGLGpu.h » ('j') | src/gpu/vk/GrVkProgram.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698