| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_LAYERS_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_LAYER_IMPL_H_ |
| 6 #define CC_LAYERS_LAYER_IMPL_H_ | 6 #define CC_LAYERS_LAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 SkColor background_color() const { return background_color_; } | 220 SkColor background_color() const { return background_color_; } |
| 221 void SetSafeOpaqueBackgroundColor(SkColor background_color); | 221 void SetSafeOpaqueBackgroundColor(SkColor background_color); |
| 222 // If contents_opaque(), return an opaque color else return a | 222 // If contents_opaque(), return an opaque color else return a |
| 223 // non-opaque color. Tries to return background_color(), if possible. | 223 // non-opaque color. Tries to return background_color(), if possible. |
| 224 SkColor SafeOpaqueBackgroundColor() const; | 224 SkColor SafeOpaqueBackgroundColor() const; |
| 225 | 225 |
| 226 void SetFilters(const FilterOperations& filters); | 226 void SetFilters(const FilterOperations& filters); |
| 227 const FilterOperations& filters() const { return filters_; } | 227 const FilterOperations& filters() const { return filters_; } |
| 228 bool FilterIsAnimating() const; | 228 bool FilterIsAnimating() const; |
| 229 bool HasPotentiallyRunningFilterAnimation() const; | 229 bool HasPotentiallyRunningFilterAnimation() const; |
| 230 bool FilterIsAnimatingOnImplOnly() const; | |
| 231 | 230 |
| 232 void SetBackgroundFilters(const FilterOperations& filters); | 231 void SetBackgroundFilters(const FilterOperations& filters); |
| 233 const FilterOperations& background_filters() const { | 232 const FilterOperations& background_filters() const { |
| 234 return background_filters_; | 233 return background_filters_; |
| 235 } | 234 } |
| 236 | 235 |
| 237 void SetMasksToBounds(bool masks_to_bounds); | 236 void SetMasksToBounds(bool masks_to_bounds); |
| 238 bool masks_to_bounds() const { return masks_to_bounds_; } | 237 bool masks_to_bounds() const { return masks_to_bounds_; } |
| 239 | 238 |
| 240 void SetContentsOpaque(bool opaque); | 239 void SetContentsOpaque(bool opaque); |
| 241 bool contents_opaque() const { return contents_opaque_; } | 240 bool contents_opaque() const { return contents_opaque_; } |
| 242 | 241 |
| 243 void SetOpacity(float opacity); | 242 void SetOpacity(float opacity); |
| 244 float opacity() const { return opacity_; } | 243 float opacity() const { return opacity_; } |
| 245 bool OpacityIsAnimating() const; | 244 bool OpacityIsAnimating() const; |
| 246 bool HasPotentiallyRunningOpacityAnimation() const; | 245 bool HasPotentiallyRunningOpacityAnimation() const; |
| 247 bool OpacityIsAnimatingOnImplOnly() const; | |
| 248 | 246 |
| 249 void SetElementId(uint64_t element_id); | 247 void SetElementId(uint64_t element_id); |
| 250 uint64_t element_id() const { return element_id_; } | 248 uint64_t element_id() const { return element_id_; } |
| 251 | 249 |
| 252 void SetMutableProperties(uint32_t properties); | 250 void SetMutableProperties(uint32_t properties); |
| 253 uint32_t mutable_properties() const { return mutable_properties_; } | 251 uint32_t mutable_properties() const { return mutable_properties_; } |
| 254 | 252 |
| 255 void SetBlendMode(SkXfermode::Mode); | 253 void SetBlendMode(SkXfermode::Mode); |
| 256 SkXfermode::Mode blend_mode() const { return blend_mode_; } | 254 SkXfermode::Mode blend_mode() const { return blend_mode_; } |
| 257 void set_draw_blend_mode(SkXfermode::Mode blend_mode) { | 255 void set_draw_blend_mode(SkXfermode::Mode blend_mode) { |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 touch_event_handler_region_ = region; | 396 touch_event_handler_region_ = region; |
| 399 } | 397 } |
| 400 const Region& touch_event_handler_region() const { | 398 const Region& touch_event_handler_region() const { |
| 401 return touch_event_handler_region_; | 399 return touch_event_handler_region_; |
| 402 } | 400 } |
| 403 | 401 |
| 404 void SetTransform(const gfx::Transform& transform); | 402 void SetTransform(const gfx::Transform& transform); |
| 405 const gfx::Transform& transform() const { return transform_; } | 403 const gfx::Transform& transform() const { return transform_; } |
| 406 bool TransformIsAnimating() const; | 404 bool TransformIsAnimating() const; |
| 407 bool HasPotentiallyRunningTransformAnimation() const; | 405 bool HasPotentiallyRunningTransformAnimation() const; |
| 408 bool TransformIsAnimatingOnImplOnly() const; | |
| 409 bool HasOnlyTranslationTransforms() const; | 406 bool HasOnlyTranslationTransforms() const; |
| 410 bool AnimationsPreserveAxisAlignment() const; | 407 bool AnimationsPreserveAxisAlignment() const; |
| 411 | 408 |
| 412 bool MaximumTargetScale(float* max_scale) const; | 409 bool MaximumTargetScale(float* max_scale) const; |
| 413 bool AnimationStartScale(float* start_scale) const; | 410 bool AnimationStartScale(float* start_scale) const; |
| 414 | 411 |
| 415 // This includes all animations, even those that are finished but haven't yet | 412 // This includes all animations, even those that are finished but haven't yet |
| 416 // been deleted. | 413 // been deleted. |
| 417 bool HasAnyAnimationTargetingProperty(TargetProperty::Type property) const; | 414 bool HasAnyAnimationTargetingProperty(TargetProperty::Type property) const; |
| 418 | 415 |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 std::unique_ptr<RenderSurfaceImpl> render_surface_; | 645 std::unique_ptr<RenderSurfaceImpl> render_surface_; |
| 649 | 646 |
| 650 bool scrolls_drawn_descendant_; | 647 bool scrolls_drawn_descendant_; |
| 651 | 648 |
| 652 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 649 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 653 }; | 650 }; |
| 654 | 651 |
| 655 } // namespace cc | 652 } // namespace cc |
| 656 | 653 |
| 657 #endif // CC_LAYERS_LAYER_IMPL_H_ | 654 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |