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

Unified Diff: src/images/SkDecodingImageGenerator.cpp

Issue 103033002: Big Cleanup: SkBitmapFactory, SkLazyPixelRef, SkImageCache (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase one last time Created 7 years 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/images/SkDecodingImageGenerator.h ('k') | src/images/SkImageDecoder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkDecodingImageGenerator.cpp
diff --git a/src/images/SkDecodingImageGenerator.cpp b/src/images/SkDecodingImageGenerator.cpp
index 65fa6fd5612abfec9f803943a7fe1e4ab0540c18..05651c78c29e2f67af1b568846f2bfd24fb9727e 100644
--- a/src/images/SkDecodingImageGenerator.cpp
+++ b/src/images/SkDecodingImageGenerator.cpp
@@ -6,8 +6,6 @@
*/
#include "SkDecodingImageGenerator.h"
-
-#include "SkBitmapFactory.h"
#include "SkData.h"
#include "SkDiscardablePixelRef.h"
#include "SkImageDecoder.h"
@@ -23,6 +21,7 @@ SkDecodingImageGenerator::~SkDecodingImageGenerator() {
}
SkData* SkDecodingImageGenerator::refEncodedData() {
+ // This functionality is used in `gm --serialize`
fData->ref();
return fData;
}
@@ -38,15 +37,16 @@ bool SkDecodingImageGenerator::getPixels(const SkImageInfo& info,
void* pixels,
size_t rowBytes) {
SkASSERT(pixels != NULL);
- SkBitmapFactory::Target target = {pixels, rowBytes};
+ SkImageDecoder::Target target = {pixels, rowBytes};
SkImageInfo tmpInfo = info;
return SkImageDecoder::DecodeMemoryToTarget(fData->data(),
fData->size(),
&tmpInfo, &target);
}
-bool SkDecodingImageGenerator::Install(SkData* data, SkBitmap* dst) {
+bool SkDecodingImageGenerator::Install(SkData* data, SkBitmap* dst,
+ SkDiscardableMemory::Factory* factory) {
SkASSERT(data != NULL);
SkASSERT(dst != NULL);
SkImageGenerator* gen(SkNEW_ARGS(SkDecodingImageGenerator, (data)));
- return SkDiscardablePixelRef::Install(gen, dst);
+ return SkDiscardablePixelRef::Install(gen, dst, factory);
}
« no previous file with comments | « src/images/SkDecodingImageGenerator.h ('k') | src/images/SkImageDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698