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

Unified Diff: cc/playback/display_list_raster_source.h

Issue 1418573002: cc: Add image decode control in the compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 11 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 | « cc/playback/display_item_list.cc ('k') | cc/playback/display_list_raster_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/playback/display_list_raster_source.h
diff --git a/cc/playback/display_list_raster_source.h b/cc/playback/display_list_raster_source.h
index ac4a80ae0cc7e3398a9b16a03255398d42640394..73c7a7f50ac6c37b7bbba5a2ced37c99d53a6e66 100644
--- a/cc/playback/display_list_raster_source.h
+++ b/cc/playback/display_list_raster_source.h
@@ -21,6 +21,7 @@
namespace cc {
class DisplayItemList;
class DrawImage;
+class ImageDecodeController;
class CC_EXPORT DisplayListRasterSource
: public base::RefCountedThreadSafe<DisplayListRasterSource> {
@@ -102,6 +103,10 @@ class CC_EXPORT DisplayListRasterSource
scoped_refptr<DisplayListRasterSource> CreateCloneWithoutLCDText() const;
+ // Image decode controller should be set once. Its lifetime has to exceed that
+ // of the raster source, since the raster source will access it during raster.
+ void SetImageDecodeController(ImageDecodeController* image_decode_controller);
+
protected:
friend class base::RefCountedThreadSafe<DisplayListRasterSource>;
@@ -128,6 +133,10 @@ class CC_EXPORT DisplayListRasterSource
// threads with multi-threaded Ganesh. Make this const or remove it.
bool should_attempt_to_use_distance_field_text_;
+ // In practice, this is only set once before raster begins, so it's ok with
+ // respect to threading.
+ ImageDecodeController* image_decode_controller_;
+
private:
// Called when analyzing a tile. We can use AnalysisCanvas as
// SkPicture::AbortCallback, which allows us to early out from analysis.
« no previous file with comments | « cc/playback/display_item_list.cc ('k') | cc/playback/display_list_raster_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698