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

Unified Diff: gm/SkLinearBitmapPipelineGM.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 | « experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp ('k') | include/core/SkShader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/SkLinearBitmapPipelineGM.cpp
diff --git a/gm/SkLinearBitmapPipelineGM.cpp b/gm/SkLinearBitmapPipelineGM.cpp
index a446b7442f879209a7555bd64f65fb1542853378..fea095239a634e826e46877b4e3cb724bbc56f1a 100644
--- a/gm/SkLinearBitmapPipelineGM.cpp
+++ b/gm/SkLinearBitmapPipelineGM.cpp
@@ -67,11 +67,10 @@ static void draw_rect_orig(SkCanvas* canvas, const SkRect& r, SkColor c, const S
paint.setFilterQuality(SkFilterQuality::kNone_SkFilterQuality);
}
paint.setShader(shader)->unref();
- SkASSERT(paint.getShader()->contextSize() <= sizeof(storage));
+ const SkShader::ContextRec rec(paint, *mat, nullptr);
+ SkASSERT(paint.getShader()->contextSize(rec) <= sizeof(storage));
- SkShader::Context* ctx = paint.getShader()->createContext(
- {paint, *mat, nullptr},
- storage);
+ SkShader::Context* ctx = paint.getShader()->createContext(rec, storage);
for (int y = 0; y < ir.height(); y++) {
ctx->shadeSpan(0, y, pmdst.writable_addr32(0, y), ir.width());
« no previous file with comments | « experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp ('k') | include/core/SkShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698