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

Unified Diff: src/core/SkDraw.cpp

Issue 1720933002: Add ContextRec param to SkShader::contextSize() (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: 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
Index: src/core/SkDraw.cpp
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index d07bcb8fcf1e05364ea900a573081a32aabe1227..3c8fe45e661b1f19aa9f6655014b2defc213af1a 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -1697,7 +1697,7 @@ class SkTriColorShader : public SkShader {
public:
SkTriColorShader() {}
- size_t contextSize() const override;
+ size_t contextSize(const ContextRec&) const override;
class TriColorShaderContext : public SkShader::Context {
public:
@@ -1771,7 +1771,7 @@ SkTriColorShader::TriColorShaderContext::TriColorShaderContext(const SkTriColorS
SkTriColorShader::TriColorShaderContext::~TriColorShaderContext() {}
-size_t SkTriColorShader::contextSize() const {
+size_t SkTriColorShader::contextSize(const ContextRec&) const {
return sizeof(TriColorShaderContext);
}
void SkTriColorShader::TriColorShaderContext::shadeSpan(int x, int y, SkPMColor dstC[], int count) {
@@ -1895,7 +1895,8 @@ void SkDraw::drawVertices(SkCanvas::VertexMode vmode, int count,
if (textures) {
SkMatrix tempM;
if (texture_to_matrix(state, vertices, textures, &tempM)) {
- SkShader::ContextRec rec(p, *fMatrix, &tempM);
+ SkShader::ContextRec rec(p, *fMatrix, &tempM, fDst.colorType(),
+ fDst.info().profileType());
if (!blitter->resetShaderContext(rec)) {
continue;
}

Powered by Google App Engine
This is Rietveld 408576698