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

Unified Diff: src/core/SkPictureShader.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/SkPictureShader.h ('k') | src/core/SkShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureShader.cpp
diff --git a/src/core/SkPictureShader.cpp b/src/core/SkPictureShader.cpp
index 44f6ef10b59254019fc0f0fd2804a2a967b0e82b..8f6d43f862992eccd5cb4e37ccbb27d36d4cab6d 100644
--- a/src/core/SkPictureShader.cpp
+++ b/src/core/SkPictureShader.cpp
@@ -237,7 +237,7 @@ SkShader* SkPictureShader::refBitmapShader(const SkMatrix& viewMatrix, const SkM
return tileShader.detach();
}
-size_t SkPictureShader::contextSize() const {
+size_t SkPictureShader::contextSize(const ContextRec&) const {
return sizeof(PictureShaderContext);
}
@@ -266,7 +266,7 @@ SkPictureShader::PictureShaderContext::PictureShaderContext(
: INHERITED(shader, rec)
, fBitmapShader(SkRef(bitmapShader))
{
- fBitmapShaderContextStorage = sk_malloc_throw(bitmapShader->contextSize());
+ fBitmapShaderContextStorage = sk_malloc_throw(bitmapShader->contextSize(rec));
fBitmapShaderContext = bitmapShader->createContext(rec, fBitmapShaderContextStorage);
//if fBitmapShaderContext is null, we are invalid
}
« no previous file with comments | « src/core/SkPictureShader.h ('k') | src/core/SkShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698