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

Unified Diff: cc/playback/recording_source.h

Issue 2141233002: cc: Clean up RecordingSource API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/raster_source.cc ('k') | cc/playback/recording_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/playback/recording_source.h
diff --git a/cc/playback/recording_source.h b/cc/playback/recording_source.h
index 36d0511d358ab2662128f4768900e722e9170d83..892948e0ca082624b0fe5fa990d246dcf0a37a5a 100644
--- a/cc/playback/recording_source.h
+++ b/cc/playback/recording_source.h
@@ -70,14 +70,13 @@ class CC_EXPORT RecordingSource {
bool can_use_lcd_text) const;
virtual bool IsSuitableForGpuRasterization() const;
- gfx::Rect recorded_viewport() const { return recorded_viewport_; }
+ gfx::Rect recorded_viewport() const { return inputs_.recorded_viewport; }
const DisplayItemList* GetDisplayItemList();
protected:
void Clear();
- gfx::Rect recorded_viewport_;
gfx::Size size_;
int slow_down_raster_scale_factor_for_debug_;
bool generate_discardable_images_metadata_;
@@ -87,8 +86,17 @@ class CC_EXPORT RecordingSource {
SkColor solid_color_;
SkColor background_color_;
- scoped_refptr<DisplayItemList> display_list_;
- size_t painter_reported_memory_usage_;
+ // Encapsulates all data received from the ContentLayerClient.
+ struct Inputs {
+ Inputs();
Khushal 2016/07/12 23:28:19 You can inline the initialization and remove the c
Menglin 2016/07/12 23:36:47 that's what i did but got the "Complex class/struc
danakj 2016/07/12 23:39:42 Then you can inline the initialization and just =
+ ~Inputs();
+
+ gfx::Rect recorded_viewport;
+ scoped_refptr<DisplayItemList> display_list;
+ size_t painter_reported_memory_usage;
+ };
+
+ Inputs inputs_;
private:
void UpdateInvalidationForNewViewport(const gfx::Rect& old_recorded_viewport,
« no previous file with comments | « cc/playback/raster_source.cc ('k') | cc/playback/recording_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698