Index: cc/layers/layer.cc |
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc |
index be1efd04677d614dc646396242e16e6211a2405a..633125bb9ceaa3c99c516b9aed32f81eb66ac057 100644 |
--- a/cc/layers/layer.cc |
+++ b/cc/layers/layer.cc |
@@ -40,6 +40,7 @@ Layer::Layer() |
have_wheel_event_handlers_(false), |
anchor_point_(0.5f, 0.5f), |
background_color_(0), |
+ compositing_reasons_(WebKit::CompositingReasonUnknown), |
opacity_(1.f), |
anchor_point_z_(0.f), |
is_container_for_fixed_position_layers_(false), |
@@ -646,6 +647,7 @@ void Layer::PushPropertiesTo(LayerImpl* layer) { |
layer->SetContentBounds(content_bounds()); |
layer->SetContentsScale(contents_scale_x(), contents_scale_y()); |
layer->SetDebugName(debug_name_); |
+ layer->SetCompositingReasons(compositing_reasons_); |
layer->SetDoubleSided(double_sided_); |
layer->SetDrawCheckerboardForMissingTiles( |
draw_checkerboard_for_missing_tiles_); |
@@ -747,6 +749,11 @@ void Layer::SetDebugName(const std::string& debug_name) { |
SetNeedsCommit(); |
} |
+void Layer::SetCompositingReasons(WebKit::WebCompositingReasons reasons) { |
danakj
2013/05/15 14:02:43
Add this to the layer unittests?
|
+ compositing_reasons_ = reasons; |
+ SetNeedsCommit(); |
+} |
+ |
void Layer::CreateRenderSurface() { |
DCHECK(!draw_properties_.render_surface); |
draw_properties_.render_surface = make_scoped_ptr(new RenderSurface(this)); |