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

Side by Side Diff: cc/layers/layer.h

Issue 16968002: Move implementation of WebFilterOperations into cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/layers/delegated_renderer_layer_impl_unittest.cc ('k') | cc/layers/layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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_H_ 5 #ifndef CC_LAYERS_LAYER_H_
6 #define CC_LAYERS_LAYER_H_ 6 #define CC_LAYERS_LAYER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/observer_list.h" 12 #include "base/observer_list.h"
13 #include "cc/animation/layer_animation_controller.h" 13 #include "cc/animation/layer_animation_controller.h"
14 #include "cc/animation/layer_animation_value_observer.h" 14 #include "cc/animation/layer_animation_value_observer.h"
15 #include "cc/base/cc_export.h" 15 #include "cc/base/cc_export.h"
16 #include "cc/base/region.h" 16 #include "cc/base/region.h"
17 #include "cc/base/scoped_ptr_vector.h" 17 #include "cc/base/scoped_ptr_vector.h"
18 #include "cc/layers/compositing_reasons.h" 18 #include "cc/layers/compositing_reasons.h"
19 #include "cc/layers/draw_properties.h" 19 #include "cc/layers/draw_properties.h"
20 #include "cc/layers/layer_lists.h" 20 #include "cc/layers/layer_lists.h"
21 #include "cc/layers/layer_position_constraint.h" 21 #include "cc/layers/layer_position_constraint.h"
22 #include "cc/layers/paint_properties.h" 22 #include "cc/layers/paint_properties.h"
23 #include "cc/layers/render_surface.h" 23 #include "cc/layers/render_surface.h"
24 #include "cc/output/filter_operations.h"
24 #include "cc/trees/occlusion_tracker.h" 25 #include "cc/trees/occlusion_tracker.h"
25 #include "skia/ext/refptr.h" 26 #include "skia/ext/refptr.h"
26 #include "third_party/WebKit/public/platform/WebFilterOperations.h"
27 #include "third_party/skia/include/core/SkColor.h" 27 #include "third_party/skia/include/core/SkColor.h"
28 #include "third_party/skia/include/core/SkImageFilter.h" 28 #include "third_party/skia/include/core/SkImageFilter.h"
29 #include "ui/gfx/rect.h" 29 #include "ui/gfx/rect.h"
30 #include "ui/gfx/rect_f.h" 30 #include "ui/gfx/rect_f.h"
31 #include "ui/gfx/transform.h" 31 #include "ui/gfx/transform.h"
32 32
33 namespace WebKit { 33 namespace WebKit {
34 class WebAnimationDelegate; 34 class WebAnimationDelegate;
35 class WebLayerScrollClient; 35 class WebLayerScrollClient;
36 } 36 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 const Layer* mask_layer() const { return mask_layer_.get(); } 111 const Layer* mask_layer() const { return mask_layer_.get(); }
112 112
113 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect); 113 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect);
114 void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::RectF(bounds())); } 114 void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::RectF(bounds())); }
115 115
116 void SetOpacity(float opacity); 116 void SetOpacity(float opacity);
117 float opacity() const { return opacity_; } 117 float opacity() const { return opacity_; }
118 bool OpacityIsAnimating() const; 118 bool OpacityIsAnimating() const;
119 virtual bool OpacityCanAnimateOnImplThread() const; 119 virtual bool OpacityCanAnimateOnImplThread() const;
120 120
121 void SetFilters(const WebKit::WebFilterOperations& filters); 121 void SetFilters(const FilterOperations& filters);
122 const WebKit::WebFilterOperations& filters() const { return filters_; } 122 const FilterOperations& filters() const { return filters_; }
123 123
124 void SetFilter(const skia::RefPtr<SkImageFilter>& filter); 124 void SetFilter(const skia::RefPtr<SkImageFilter>& filter);
125 skia::RefPtr<SkImageFilter> filter() const { return filter_; } 125 skia::RefPtr<SkImageFilter> filter() const { return filter_; }
126 126
127 // Background filters are filters applied to what is behind this layer, when 127 // Background filters are filters applied to what is behind this layer, when
128 // they are viewed through non-opaque regions in this layer. They are used 128 // they are viewed through non-opaque regions in this layer. They are used
129 // through the WebLayer interface, and are not exposed to HTML. 129 // through the WebLayer interface, and are not exposed to HTML.
130 void SetBackgroundFilters(const WebKit::WebFilterOperations& filters); 130 void SetBackgroundFilters(const FilterOperations& filters);
131 const WebKit::WebFilterOperations& background_filters() const { 131 const FilterOperations& background_filters() const {
132 return background_filters_; 132 return background_filters_;
133 } 133 }
134 134
135 virtual void SetContentsOpaque(bool opaque); 135 virtual void SetContentsOpaque(bool opaque);
136 bool contents_opaque() const { return contents_opaque_; } 136 bool contents_opaque() const { return contents_opaque_; }
137 137
138 void SetPosition(gfx::PointF position); 138 void SetPosition(gfx::PointF position);
139 gfx::PointF position() const { return position_; } 139 gfx::PointF position() const { return position_; }
140 140
141 void SetIsContainerForFixedPositionLayers(bool container); 141 void SetIsContainerForFixedPositionLayers(bool container);
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 bool have_wheel_event_handlers_; 452 bool have_wheel_event_handlers_;
453 Region non_fast_scrollable_region_; 453 Region non_fast_scrollable_region_;
454 Region touch_event_handler_region_; 454 Region touch_event_handler_region_;
455 gfx::PointF position_; 455 gfx::PointF position_;
456 gfx::PointF anchor_point_; 456 gfx::PointF anchor_point_;
457 SkColor background_color_; 457 SkColor background_color_;
458 std::string debug_name_; 458 std::string debug_name_;
459 CompositingReasons compositing_reasons_; 459 CompositingReasons compositing_reasons_;
460 float opacity_; 460 float opacity_;
461 skia::RefPtr<SkImageFilter> filter_; 461 skia::RefPtr<SkImageFilter> filter_;
462 WebKit::WebFilterOperations filters_; 462 FilterOperations filters_;
463 WebKit::WebFilterOperations background_filters_; 463 FilterOperations background_filters_;
464 float anchor_point_z_; 464 float anchor_point_z_;
465 bool is_container_for_fixed_position_layers_; 465 bool is_container_for_fixed_position_layers_;
466 LayerPositionConstraint position_constraint_; 466 LayerPositionConstraint position_constraint_;
467 bool is_drawable_; 467 bool is_drawable_;
468 bool masks_to_bounds_; 468 bool masks_to_bounds_;
469 bool contents_opaque_; 469 bool contents_opaque_;
470 bool double_sided_; 470 bool double_sided_;
471 bool preserves_3d_; 471 bool preserves_3d_;
472 bool use_parent_backface_visibility_; 472 bool use_parent_backface_visibility_;
473 bool draw_checkerboard_for_missing_tiles_; 473 bool draw_checkerboard_for_missing_tiles_;
(...skipping 15 matching lines...) Expand all
489 DrawProperties<Layer, RenderSurface> draw_properties_; 489 DrawProperties<Layer, RenderSurface> draw_properties_;
490 490
491 PaintProperties paint_properties_; 491 PaintProperties paint_properties_;
492 492
493 DISALLOW_COPY_AND_ASSIGN(Layer); 493 DISALLOW_COPY_AND_ASSIGN(Layer);
494 }; 494 };
495 495
496 } // namespace cc 496 } // namespace cc
497 497
498 #endif // CC_LAYERS_LAYER_H_ 498 #endif // CC_LAYERS_LAYER_H_
OLDNEW
« no previous file with comments | « cc/layers/delegated_renderer_layer_impl_unittest.cc ('k') | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698