Chromium Code Reviews| Index: content/browser/android/edge_effect.cc |
| diff --git a/content/browser/android/edge_effect.cc b/content/browser/android/edge_effect.cc |
| index 94e5b512e20505bf5ad12c59f9258e88f9fa41b1..7ddc8496bf3685a63f97d2770b4e13ba2935afa0 100644 |
| --- a/content/browser/android/edge_effect.cc |
| +++ b/content/browser/android/edge_effect.cc |
| @@ -4,7 +4,7 @@ |
| #include "content/browser/android/edge_effect.h" |
| -#include "cc/layers/layer.h" |
| +#include "cc/layers/ui_resource_layer.h" |
| namespace content { |
| @@ -143,24 +143,24 @@ void UpdateLayer(cc::Layer* layer, |
| } // namespace |
| -EdgeEffect::EdgeEffect(scoped_refptr<cc::Layer> edge, |
| - scoped_refptr<cc::Layer> glow) |
| - : edge_(edge) |
| - , glow_(glow) |
| - , edge_alpha_(0) |
| - , edge_scale_y_(0) |
| - , glow_alpha_(0) |
| - , glow_scale_y_(0) |
| - , edge_alpha_start_(0) |
| - , edge_alpha_finish_(0) |
| - , edge_scale_y_start_(0) |
| - , edge_scale_y_finish_(0) |
| - , glow_alpha_start_(0) |
| - , glow_alpha_finish_(0) |
| - , glow_scale_y_start_(0) |
| - , glow_scale_y_finish_(0) |
| - , state_(STATE_IDLE) |
| - , pull_distance_(0) { |
| +EdgeEffect::EdgeEffect(scoped_refptr<cc::UIResourceLayer> edge, |
| + scoped_refptr<cc::UIResourceLayer> glow) |
| + : edge_(edge), |
| + glow_(glow), |
| + edge_alpha_(0), |
| + edge_scale_y_(0), |
| + glow_alpha_(0), |
| + glow_scale_y_(0), |
| + edge_alpha_start_(0), |
| + edge_alpha_finish_(0), |
| + edge_scale_y_start_(0), |
| + edge_scale_y_finish_(0), |
| + glow_alpha_start_(0), |
| + glow_alpha_finish_(0), |
| + glow_scale_y_start_(0), |
| + glow_scale_y_finish_(0), |
| + state_(STATE_IDLE), |
| + pull_distance_(0) { |
|
powei
2014/07/08 19:12:43
result of clang-format. Let me know if the other
jdduke (slow)
2014/07/08 20:10:11
It's not, this is great.
|
| // Prevent the provided layers from drawing until the effect is activated. |
| DisableLayer(edge_.get()); |
| DisableLayer(glow_.get()); |
| @@ -377,4 +377,10 @@ void EdgeEffect::ApplyToLayers(gfx::SizeF window_size, |
| edge_.get(), edge, window_size, offset, scaled_edge_height, edge_alpha_); |
| } |
| -} // namespace content |
| +void EdgeEffect::SetUIResources(cc::UIResourceId edge_resource, |
| + cc::UIResourceId glow_resource) { |
| + edge_->SetUIResourceId(edge_resource); |
| + glow_->SetUIResourceId(glow_resource); |
| +} |
| + |
| +} // namespace content |