aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar Florin Malita <fmalita@chromium.org>2017-05-24 15:33:28 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-24 19:56:15 +0000
commit58a756435ca3700d9766a4580bb0771a9774f603 (patch)
tree698e327baf54c7c449d019b95f51a553fbadc59c /gm
parentaa13223f54d1f55ba702582f61359f8b43782730 (diff)
SkShaderBase
Introduce a private base class (SkShaderBase), to hide implementation details from the public interface (SkShader). Change-Id: If3ec26ca6abc9da20e3f139c11fdc023bdd85176 Reviewed-on: https://skia-review.googlesource.com/17241 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
Diffstat (limited to 'gm')
-rw-r--r--gm/SkLinearBitmapPipelineGM.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/gm/SkLinearBitmapPipelineGM.cpp b/gm/SkLinearBitmapPipelineGM.cpp
index f07d2f7efe..87566ad43e 100644
--- a/gm/SkLinearBitmapPipelineGM.cpp
+++ b/gm/SkLinearBitmapPipelineGM.cpp
@@ -16,7 +16,7 @@
#include "SkLinearBitmapPipeline.h"
#include "SkXfermodePriv.h"
#include "SkPM4fPriv.h"
-#include "SkShader.h"
+#include "SkShaderBase.h"
static void fill_in_bits(SkBitmap& bm, SkIRect ir, SkColor c, bool premul) {
bm.allocN32Pixels(ir.width(), ir.height());
@@ -72,11 +72,11 @@ static void draw_rect_orig(SkCanvas* canvas, const SkRect& r, SkColor c, const S
paint.setFilterQuality(SkFilterQuality::kNone_SkFilterQuality);
}
paint.setShader(std::move(shader));
- const SkShader::ContextRec rec(paint, *mat, nullptr,
- SkBlitter::PreferredShaderDest(pmsrc.info()),
- canvas->imageInfo().colorSpace());
+ const SkShaderBase::ContextRec rec(paint, *mat, nullptr,
+ SkBlitter::PreferredShaderDest(pmsrc.info()),
+ canvas->imageInfo().colorSpace());
- SkShader::Context* ctx = paint.getShader()->makeContext(rec, &alloc);
+ SkShaderBase::Context* ctx = as_SB(paint.getShader())->makeContext(rec, &alloc);
for (int y = 0; y < ir.height(); y++) {
ctx->shadeSpan(0, y, pmdst.writable_addr32(0, y), ir.width());