SkRasterPipelineBlitter doesn't need an SkArenaAlloc.
authorMike Klein <mtklein@chromium.org>
Tue, 7 Feb 2017 17:05:10 +0000 (12:05 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Wed, 8 Feb 2017 21:26:06 +0000 (21:26 +0000)
Change-Id: Ie4f8bb1c05dee4639a075c100abbc5262e521fc4
Reviewed-on: https://skia-review.googlesource.com/8128
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
src/core/SkRasterPipelineBlitter.cpp

index 80e6344..273f5fe 100644 (file)
@@ -63,10 +63,6 @@ private:
     float       fCurrentCoverage = 0.0f;
     int         fCurrentY        = 0;
 
-    // Scratch space for shaders and color filters to use.
-    char            fScratch[64];
-    SkArenaAlloc    fArena{fScratch, sizeof(fScratch), 128};
-
     typedef SkBlitter INHERITED;
 };
 
@@ -116,8 +112,7 @@ SkBlitter* SkRasterPipelineBlitter::Create(const SkPixmap& dst,
          is_constant = true;
     if (shader) {
         pipeline->append(SkRasterPipeline::seed_shader, &blitter->fCurrentY);
-        if (!shader->appendStages(pipeline, dst.colorSpace(), &blitter->fArena,
-                                  ctm, paint)) {
+        if (!shader->appendStages(pipeline, dst.colorSpace(), alloc, ctm, paint)) {
             return nullptr;
         }
         if (!is_opaque) {
@@ -137,8 +132,7 @@ SkBlitter* SkRasterPipelineBlitter::Create(const SkPixmap& dst,
     }
 
     if (colorFilter) {
-        if (!colorFilter->appendStages(pipeline, dst.colorSpace(), &blitter->fArena,
-                                       is_opaque)) {
+        if (!colorFilter->appendStages(pipeline, dst.colorSpace(), alloc, is_opaque)) {
             return nullptr;
         }
         is_opaque = is_opaque && (colorFilter->getFlags() & SkColorFilter::kAlphaUnchanged_Flag);