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

Unified Diff: cc/resources/display_list_raster_source.h

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/resources/display_item_list_unittest.cc ('k') | cc/resources/display_list_raster_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/display_list_raster_source.h
diff --git a/cc/resources/display_list_raster_source.h b/cc/resources/display_list_raster_source.h
index 8f1fd12eba8db0e219a1d6a4f7c44230ff314c7b..f095231381858bcde5f44c6b1e71bd3f51fdb2bd 100644
--- a/cc/resources/display_list_raster_source.h
+++ b/cc/resources/display_list_raster_source.h
@@ -46,11 +46,9 @@ class CC_EXPORT DisplayListRasterSource : public RasterSource {
float contents_scale) const override;
bool HasRecordings() const override;
void SetShouldAttemptToUseDistanceFieldText() override;
- void SetBackgoundColor(SkColor background_color) override;
- void SetRequiresClear(bool requires_clear) override;
bool ShouldAttemptToUseDistanceFieldText() const override;
void DidBeginTracing() override;
- void AsValueInto(base::debug::TracedValue* array) const override;
+ void AsValueInto(base::trace_event::TracedValue* array) const override;
skia::RefPtr<SkPicture> GetFlattenedPicture() override;
size_t GetPictureMemoryUsage() const override;
bool CanUseLCDText() const override;
@@ -60,16 +58,21 @@ class CC_EXPORT DisplayListRasterSource : public RasterSource {
explicit DisplayListRasterSource(const DisplayListRecordingSource* other);
~DisplayListRasterSource() override;
- scoped_refptr<DisplayItemList> display_list_;
- SkColor background_color_;
- bool requires_clear_;
- bool can_use_lcd_text_;
- bool is_solid_color_;
- SkColor solid_color_;
- gfx::Rect recorded_viewport_;
- gfx::Size size_;
- bool clear_canvas_with_debug_color_;
- int slow_down_raster_scale_factor_for_debug_;
+ // These members are const as this raster source may be in use on another
+ // thread and so should not be touched after construction.
+ const scoped_refptr<DisplayItemList> display_list_;
+ const SkColor background_color_;
+ const bool requires_clear_;
+ const bool can_use_lcd_text_;
+ const bool is_solid_color_;
+ const SkColor solid_color_;
+ const gfx::Rect recorded_viewport_;
+ const gfx::Size size_;
+ const bool clear_canvas_with_debug_color_;
+ const int slow_down_raster_scale_factor_for_debug_;
+ // TODO(enne/vmiura): this has a read/write race between raster and compositor
+ // threads with multi-threaded Ganesh. Make this const or remove it.
+ bool should_attempt_to_use_distance_field_text_;
private:
// Called when analyzing a tile. We can use AnalysisCanvas as
@@ -84,8 +87,6 @@ class CC_EXPORT DisplayListRasterSource : public RasterSource {
float contents_scale,
bool is_analysis) const;
- bool should_attempt_to_use_distance_field_text_;
-
DISALLOW_COPY_AND_ASSIGN(DisplayListRasterSource);
};
« no previous file with comments | « cc/resources/display_item_list_unittest.cc ('k') | cc/resources/display_list_raster_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698