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

Unified Diff: Source/core/platform/graphics/DeferredImageDecoder.h

Issue 105773003: Teach Skia to use discardable memory (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
Index: Source/core/platform/graphics/DeferredImageDecoder.h
diff --git a/Source/core/platform/graphics/DeferredImageDecoder.h b/Source/core/platform/graphics/DeferredImageDecoder.h
index 4f5f549980fb0f5323781c462a81025992cc12cc..d67eb2edc420a2e016bb02f353eb73a23c6c4913 100644
--- a/Source/core/platform/graphics/DeferredImageDecoder.h
+++ b/Source/core/platform/graphics/DeferredImageDecoder.h
@@ -49,6 +49,7 @@ public:
static bool isLazyDecoded(const SkBitmap&);
static void setEnabled(bool);
+ static void setEnabledSkiaDiscardableMemory(bool);
Stephen White 2013/12/05 21:52:14 Nit: kind of awkward. Could this be setSkiaDiscard
Alpha Left Google 2013/12/08 00:30:11 Done.
String filenameExtension() const;
@@ -75,6 +76,8 @@ public:
private:
explicit DeferredImageDecoder(PassOwnPtr<ImageDecoder> actualDecoder);
void prepareLazyDecodedFrames();
+ SkBitmap createBitmap(size_t index);
+ SkBitmap createSkiaDiscardableBitmap(size_t index);
SkBitmap createLazyDecodingBitmap(size_t index);
void activateLazyDecoding();
void setData(PassRefPtr<SharedBuffer>, bool allDataReceived);
@@ -92,6 +95,7 @@ private:
RefPtr<ImageFrameGenerator> m_frameGenerator;
static bool s_enabled;
+ static bool s_enabledSkiaDiscardableMemory;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698