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

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: 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
« ui/aura/bench/bench_main.cc ('K') | « 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 d5f0c445e8a45fd22ff7ee80218a45fc774432e9..6e84107d4f0b561f85ab55dd4cde8dd73b7a3096 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),
@@ -63,6 +64,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),
@@ -296,6 +298,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();
}
@@ -399,6 +402,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_;
« ui/aura/bench/bench_main.cc ('K') | « ui/compositor/layer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698