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

Unified Diff: src/effects/SkTableColorFilter.cpp

Issue 1225923010: Refugee from Dead Machine 4: MDB Monster Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Last update from dead machine Created 4 years, 8 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/effects/SkPerlinNoiseShader.cpp ('k') | src/effects/SkXfermodeImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkTableColorFilter.cpp
diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp
index 872fdfddc231891325ee7990f76bbb942bf3946e..8bbe43189b1b8abe236d778e7c80cef7aca49bfb 100644
--- a/src/effects/SkTableColorFilter.cpp
+++ b/src/effects/SkTableColorFilter.cpp
@@ -49,7 +49,8 @@ public:
SkColorFilter* newComposed(const SkColorFilter* inner) const override;
#if SK_SUPPORT_GPU
- const GrFragmentProcessor* asFragmentProcessor(GrContext*) const override;
+ const GrFragmentProcessor* asFragmentProcessor(GrContext*,
+ GrRenderTarget* dst) const override;
#endif
void filterSpan(const SkPMColor src[], int count, SkPMColor dst[]) const override;
@@ -342,7 +343,7 @@ SkColorFilter* SkTable_ColorFilter::newComposed(const SkColorFilter* innerFilter
class ColorTableEffect : public GrFragmentProcessor {
public:
- static const GrFragmentProcessor* Create(GrContext* context, SkBitmap bitmap, unsigned flags);
+ static const GrFragmentProcessor* Create(GrContext* context, SkBitmap bitmap, unsigned flags, GrRenderTarget* dst);
virtual ~ColorTableEffect();
@@ -360,7 +361,7 @@ private:
void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
- ColorTableEffect(GrTexture* texture, GrTextureStripAtlas* atlas, int row, unsigned flags);
+ ColorTableEffect(GrTexture* texture, GrTextureStripAtlas* atlas, int row, unsigned flags, GrRenderTarget* dst);
GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
@@ -464,8 +465,7 @@ void GLColorTableEffect::emitCode(EmitArgs& args) {
///////////////////////////////////////////////////////////////////////////////
const GrFragmentProcessor* ColorTableEffect::Create(GrContext* context, SkBitmap bitmap,
- unsigned flags) {
-
+ unsigned flags, GrRenderTarget* dst) {
GrTextureStripAtlas::Desc desc;
desc.fWidth = bitmap.width();
desc.fHeight = 128;
@@ -482,12 +482,12 @@ const GrFragmentProcessor* ColorTableEffect::Create(GrContext* context, SkBitmap
texture.reset(SkRef(atlas->getTexture()));
}
- return new ColorTableEffect(texture, atlas, row, flags);
+ return new ColorTableEffect(texture, atlas, row, flags, dst);
}
ColorTableEffect::ColorTableEffect(GrTexture* texture, GrTextureStripAtlas* atlas, int row,
- unsigned flags)
- : fTextureAccess(texture, "a")
+ unsigned flags, GrRenderTarget* dst)
+ : fTextureAccess(texture, "a", GrTextureParams::kNone_FilterMode,SkShader::kClamp_TileMode, dst)
, fFlags(flags)
, fAtlas(atlas)
, fRow(row) {
@@ -565,16 +565,17 @@ const GrFragmentProcessor* ColorTableEffect::TestCreate(GrProcessorTestData* d)
(flags & (1 << 3)) ? luts[3] : nullptr
));
- const GrFragmentProcessor* fp = filter->asFragmentProcessor(d->fContext);
+ const GrFragmentProcessor* fp = filter->asFragmentProcessor(d->fContext, NULL);
SkASSERT(fp);
return fp;
}
-const GrFragmentProcessor* SkTable_ColorFilter::asFragmentProcessor(GrContext* context) const {
+const GrFragmentProcessor* SkTable_ColorFilter::asFragmentProcessor(GrContext* context,
+ GrRenderTarget* dst) const {
SkBitmap bitmap;
this->asComponentTable(&bitmap);
- return ColorTableEffect::Create(context, bitmap, fFlags);
+ return ColorTableEffect::Create(context, bitmap, fFlags, dst);
}
#endif // SK_SUPPORT_GPU
« no previous file with comments | « src/effects/SkPerlinNoiseShader.cpp ('k') | src/effects/SkXfermodeImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698