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

Unified Diff: src/image/SkImage_Generator.cpp

Issue 1412423008: Handling large jpegs in CPU raster - downsample to display res and 565 Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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/image/SkImage_Base.h ('k') | src/image/SkImage_Gpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Generator.cpp
diff --git a/src/image/SkImage_Generator.cpp b/src/image/SkImage_Generator.cpp
index 346528939ab67b88e52cb1cd646119078ae1a4b6..e97cafe2523769b465b3dbce8380ae4e556c480d 100644
--- a/src/image/SkImage_Generator.cpp
+++ b/src/image/SkImage_Generator.cpp
@@ -26,7 +26,7 @@ public:
SkData* onRefEncoded() const override;
bool isOpaque() const override { return fCache->info().isOpaque(); }
SkImage* onNewSubset(const SkIRect&) const override;
- bool getROPixels(SkBitmap*) const override;
+ bool getROPixels(SkBitmap*, SkScalar = SK_Scalar1) const override;
GrTexture* asTextureRef(GrContext*, const GrTextureParams&) const override;
bool onIsLazyGenerated() const override { return true; }
@@ -55,8 +55,8 @@ SkData* SkImage_Generator::onRefEncoded() const {
return fCache->refEncoded();
}
-bool SkImage_Generator::getROPixels(SkBitmap* bitmap) const {
- return fCache->lockAsBitmap(bitmap, this);
+bool SkImage_Generator::getROPixels(SkBitmap* bitmap, SkScalar scaleHint) const {
+ return fCache->lockAsBitmap(bitmap, this, scaleHint);
}
GrTexture* SkImage_Generator::asTextureRef(GrContext* ctx, const GrTextureParams& params) const {
« no previous file with comments | « src/image/SkImage_Base.h ('k') | src/image/SkImage_Gpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698