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

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: 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: gm/SkLinearBitmapPipelineGM.cpp
diff --git a/gm/SkLinearBitmapPipelineGM.cpp b/gm/SkLinearBitmapPipelineGM.cpp
index a446b7442f879209a7555bd64f65fb1542853378..f382157b8f6fb1ad2b67bb317ded09cb89d6b0a9 100644
--- a/gm/SkLinearBitmapPipelineGM.cpp
+++ b/gm/SkLinearBitmapPipelineGM.cpp
@@ -67,11 +67,11 @@ 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,
+ pmsrc.colorType(), pmsrc.info().profileType());
+ 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());

Powered by Google App Engine
This is Rietveld 408576698