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

Unified Diff: cc/resources/display_list_recording_source.cc

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_list_recording_source.h ('k') | cc/resources/drawing_display_item.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/display_list_recording_source.cc
diff --git a/cc/resources/display_list_recording_source.cc b/cc/resources/display_list_recording_source.cc
index e60e4c16d2949054c7f70e8a1e3c8e3d98403381..01a3bcef9944e2504829e79ad3b40bef46bd5ec7 100644
--- a/cc/resources/display_list_recording_source.cc
+++ b/cc/resources/display_list_recording_source.cc
@@ -29,8 +29,10 @@ namespace cc {
DisplayListRecordingSource::DisplayListRecordingSource()
: slow_down_raster_scale_factor_for_debug_(0),
can_use_lcd_text_(true),
+ requires_clear_(false),
is_solid_color_(false),
solid_color_(SK_ColorTRANSPARENT),
+ background_color_(SK_ColorTRANSPARENT),
pixel_record_distance_(kPixelDistanceToRecord),
is_suitable_for_gpu_rasterization_(true) {
}
@@ -60,10 +62,9 @@ bool DisplayListRecordingSource::UpdateAndExpandInvalidation(
}
gfx::Rect old_recorded_viewport = recorded_viewport_;
- // TODO(wangxianzhu): Blink slimming paint doesn't support incremental
- // painting for now so we must record for the whole layer. Should measure
- // performance and determine the best choice. Consider display item caching.
- recorded_viewport_ = gfx::Rect(GetSize());
+ recorded_viewport_ = visible_layer_rect;
+ recorded_viewport_.Inset(-pixel_record_distance_, -pixel_record_distance_);
+ recorded_viewport_.Intersect(gfx::Rect(GetSize()));
if (recorded_viewport_ != old_recorded_viewport) {
// Invalidate newly-exposed and no-longer-exposed areas.
@@ -135,6 +136,14 @@ void DisplayListRecordingSource::SetSlowdownRasterScaleFactor(int factor) {
slow_down_raster_scale_factor_for_debug_ = factor;
}
+void DisplayListRecordingSource::SetBackgroundColor(SkColor background_color) {
+ background_color_ = background_color;
+}
+
+void DisplayListRecordingSource::SetRequiresClear(bool requires_clear) {
+ requires_clear_ = requires_clear;
+}
+
void DisplayListRecordingSource::SetUnsuitableForGpuRasterizationForTesting() {
is_suitable_for_gpu_rasterization_ = false;
}
« no previous file with comments | « cc/resources/display_list_recording_source.h ('k') | cc/resources/drawing_display_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698