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

Unified Diff: cc/resources/picture_pile.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/picture_pile.h ('k') | cc/resources/picture_pile_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_pile.cc
diff --git a/cc/resources/picture_pile.cc b/cc/resources/picture_pile.cc
index dcfe49ea7a0498b98d9357d4a7b032938e92406c..7e94e18e44477c536e40ce94a0d0dc3fb0d1f729 100644
--- a/cc/resources/picture_pile.cc
+++ b/cc/resources/picture_pile.cc
@@ -152,6 +152,12 @@ void ClusterTiles(const std::vector<gfx::Rect>& invalid_tiles,
*record_rects = vertical_clustering;
}
+#ifdef NDEBUG
+const bool kDefaultClearCanvasSetting = false;
+#else
+const bool kDefaultClearCanvasSetting = true;
+#endif
+
} // namespace
namespace cc {
@@ -162,8 +168,11 @@ PicturePile::PicturePile(float min_contents_scale,
slow_down_raster_scale_factor_for_debug_(0),
can_use_lcd_text_(true),
has_any_recordings_(false),
+ clear_canvas_with_debug_color_(kDefaultClearCanvasSetting),
+ requires_clear_(true),
is_solid_color_(false),
solid_color_(SK_ColorTRANSPARENT),
+ background_color_(SK_ColorTRANSPARENT),
pixel_record_distance_(kPixelDistanceToRecord),
is_suitable_for_gpu_rasterization_(true) {
tiling_.SetMaxTextureSize(gfx::Size(kBasePictureSize, kBasePictureSize));
@@ -623,6 +632,14 @@ void PicturePile::SetSlowdownRasterScaleFactor(int factor) {
slow_down_raster_scale_factor_for_debug_ = factor;
}
+void PicturePile::SetBackgroundColor(SkColor background_color) {
+ background_color_ = background_color;
+}
+
+void PicturePile::SetRequiresClear(bool requires_clear) {
+ requires_clear_ = requires_clear;
+}
+
bool PicturePile::IsSuitableForGpuRasterization() const {
return is_suitable_for_gpu_rasterization_;
}
« no previous file with comments | « cc/resources/picture_pile.h ('k') | cc/resources/picture_pile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698