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

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

Issue 105773003: Teach Skia to use discardable memory (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: merged and discardable 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/platform/graphics/DeferredImageDecoder.h
diff --git a/Source/platform/graphics/DeferredImageDecoder.h b/Source/platform/graphics/DeferredImageDecoder.h
index d87284d0e924aea72a81a935ead48eb37de1a561..80d73af3c242fea4b5fdc89148771cdb7fd466b3 100644
--- a/Source/platform/graphics/DeferredImageDecoder.h
+++ b/Source/platform/graphics/DeferredImageDecoder.h
@@ -52,6 +52,7 @@ public:
static bool isLazyDecoded(const SkBitmap&);
static void setEnabled(bool);
+ static void setSkiaDiscardableMemoryEnabled(bool);
String filenameExtension() const;
@@ -78,6 +79,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);
@@ -95,6 +98,7 @@ private:
RefPtr<ImageFrameGenerator> m_frameGenerator;
static bool s_enabled;
+ static bool s_skiaDiscardableMemoryEnabled;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698