Random set of changes for workspace2 code:
. Makes Layer::GetCombinedOpacity() public so I can use in tests.
. Makes some debugging functions in Window public, extends what they
output and makes iteration consistant with View.
. Adds WindowAnimationDelegate. Its used to decide if a window should
be animated. I need this so that workspace code can selectively
disable some window animations.
. Makes WindowWatcher work with old workspace code.
. Installs a default background for ash_shell.
BUG=137342
TEST=none
[email protected]
Review URL: https://chromiumcodereview.appspot.com/10872024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153124 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h
index a999de8..9035559d 100644
--- a/ui/compositor/layer.h
+++ b/ui/compositor/layer.h
@@ -131,6 +131,10 @@
float opacity() const { return opacity_; }
void SetOpacity(float opacity);
+ // Returns the actual opacity, which the opacity of this layer multipled by
+ // the combined opacity of the parent.
+ float GetCombinedOpacity() const;
+
// Blur pixels by this amount in anything below the layer and visible through
// the layer.
int background_blur() const { return background_blur_radius_; }
@@ -275,12 +279,6 @@
bool force_render_surface() const { return force_render_surface_; }
private:
- // TODO(vollick): Eventually, if a non-leaf node has an opacity of less than
- // 1.0, we'll render to a separate texture, and then apply the alpha.
- // Currently, we multiply our opacity by all our ancestor's opacities and
- // use the combined result, but this is only temporary.
- float GetCombinedOpacity() const;
-
// Stacks |child| above or below |other|. Helper method for StackAbove() and
// StackBelow().
void StackRelativeTo(Layer* child, Layer* other, bool above);