diff options
author | 2017-01-17 10:06:20 -0500 | |
---|---|---|
committer | 2017-01-17 16:44:42 +0000 | |
commit | 3f142b6a785ab7af64383fccf98ae2528cdd71e3 (patch) | |
tree | 425d1bb18f27432d625a0ec46e26bdabb5630a3e /samplecode | |
parent | cb6266b5aa5bbfd880532f08eec83b0c585e873f (diff) |
Remove (most) usage of MakeTextureFromPixmap
Planning to remove this API entirely, as it's not really needed. There is
one remaining call-site that requires a bigger change, so I want to land
these first.
BUG=skia:
Change-Id: I6c6ae88202291c4896c1ba8f47824596ac8a150f
Reviewed-on: https://skia-review.googlesource.com/7105
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'samplecode')
-rw-r--r-- | samplecode/SampleApp.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp index a1dabc2f65..3919c244a2 100644 --- a/samplecode/SampleApp.cpp +++ b/samplecode/SampleApp.cpp @@ -18,8 +18,6 @@ #include "SkDocument.h" #include "SkGammaColorFilter.h" #include "SkGraphics.h" -#include "SkImage_Base.h" -#include "SkImageEncoder.h" #include "SkOSFile.h" #include "SkOSPath.h" #include "SkPaint.h" @@ -345,10 +343,6 @@ public: SkBitmap bm; bm.allocPixels(offscreenInfo); renderingCanvas->readPixels(&bm, 0, 0); - SkPixmap pm; - bm.peekPixels(&pm); - sk_sp<SkImage> image(SkImage::MakeTextureFromPixmap(fCurContext, pm, - SkBudgeted::kNo)); SkCanvas* gpuCanvas = fGpuSurface->getCanvas(); @@ -363,7 +357,7 @@ public: gammaPaint.setColorFilter(SkGammaColorFilter::Make(1.0f / 2.2f)); } - gpuCanvas->drawImage(image, 0, 0, &gammaPaint); + gpuCanvas->drawBitmap(bm, 0, 0, &gammaPaint); } fGpuSurface->prepareForExternalIO(); |