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

Unified Diff: src/core/SkBlitter.cpp

Issue 1720933002: Add ContextRec param to SkShader::contextSize() (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: ContextRec plumbing only Created 4 years, 10 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/core/SkBitmapProcShader.h ('k') | src/core/SkColorFilterShader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBlitter.cpp
diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp
index 41d6071d6eb0581bc42bc0fab782659193158598..804bc813d6054a64b75407d1a590288571968733 100644
--- a/src/core/SkBlitter.cpp
+++ b/src/core/SkBlitter.cpp
@@ -592,10 +592,10 @@ public:
SkSafeUnref(fProxy);
}
- size_t contextSize() const override {
+ size_t contextSize(const ContextRec& rec) const override {
size_t size = sizeof(Sk3DShaderContext);
if (fProxy) {
- size += fProxy->contextSize();
+ size += fProxy->contextSize(rec);
}
return size;
}
@@ -876,7 +876,7 @@ SkBlitter* SkBlitter::Choose(const SkPixmap& device,
SkShader::Context* shaderContext = nullptr;
if (shader) {
SkShader::ContextRec rec(*paint, matrix, nullptr);
- size_t contextSize = shader->contextSize();
+ size_t contextSize = shader->contextSize(rec);
if (contextSize) {
// Try to create the ShaderContext
void* storage = allocator->reserveT<SkShader::Context>(contextSize);
« no previous file with comments | « src/core/SkBitmapProcShader.h ('k') | src/core/SkColorFilterShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698