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

Unified Diff: ui/compositor/layer.cc

Issue 10444019: Aura: add a bench utility (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix review comments Created 8 years, 7 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 | « ui/compositor/layer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.cc
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index ca3f385986f85f21e88402de069c90bb9fc395c7..72468bc4c91c79f9d1bb7c51b0f6c93e05262286 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -49,6 +49,7 @@ Layer::Layer()
compositor_(NULL),
parent_(NULL),
visible_(true),
+ force_render_surface_(false),
fills_bounds_opaquely_(true),
layer_updated_externally_(false),
opacity_(1.0f),
@@ -64,6 +65,7 @@ Layer::Layer(LayerType type)
compositor_(NULL),
parent_(NULL),
visible_(true),
+ force_render_surface_(false),
fills_bounds_opaquely_(true),
layer_updated_externally_(false),
opacity_(1.0f),
@@ -313,6 +315,7 @@ void Layer::SetExternalTexture(Texture* texture) {
web_layer_.setOpaque(fills_bounds_opaquely_);
web_layer_.setOpacity(visible_ ? opacity_ : 0.f);
web_layer_.setDebugBorderWidth(show_debug_borders_ ? 2 : 0);
+ web_layer_.setForceRenderSurface(force_render_surface_);
RecomputeTransform();
RecomputeDebugBorderColor();
}
@@ -416,6 +419,14 @@ void Layer::paintContents(WebKit::WebCanvas* web_canvas,
canvas.Restore();
}
+void Layer::SetForceRenderSurface(bool force) {
+ if (force_render_surface_ == force)
+ return;
+
+ force_render_surface_ = force;
+ web_layer_.setForceRenderSurface(force_render_surface_);
+}
+
float Layer::GetCombinedOpacity() const {
float opacity = opacity_;
Layer* current = this->parent_;
« no previous file with comments | « ui/compositor/layer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698