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

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

Issue 397443002: [not for review] Add Draw entries to window Performance Timeline Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git pull of third_party/WebKit Created 6 years, 5 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
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 <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility>
11 #include <vector>
10 12
11 #include "base/callback.h" 13 #include "base/callback.h"
12 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
13 #include "base/observer_list.h" 15 #include "base/observer_list.h"
14 #include "cc/animation/layer_animation_controller.h" 16 #include "cc/animation/layer_animation_controller.h"
15 #include "cc/animation/layer_animation_value_observer.h" 17 #include "cc/animation/layer_animation_value_observer.h"
16 #include "cc/animation/layer_animation_value_provider.h" 18 #include "cc/animation/layer_animation_value_provider.h"
17 #include "cc/base/cc_export.h" 19 #include "cc/base/cc_export.h"
18 #include "cc/base/region.h" 20 #include "cc/base/region.h"
19 #include "cc/base/scoped_ptr_vector.h" 21 #include "cc/base/scoped_ptr_vector.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 68
67 // Base class for composited layers. Special layer types are derived from 69 // Base class for composited layers. Special layer types are derived from
68 // this class. 70 // this class.
69 class CC_EXPORT Layer : public base::RefCounted<Layer>, 71 class CC_EXPORT Layer : public base::RefCounted<Layer>,
70 public LayerAnimationValueObserver, 72 public LayerAnimationValueObserver,
71 public LayerAnimationValueProvider { 73 public LayerAnimationValueProvider {
72 public: 74 public:
73 typedef RenderSurfaceLayerList RenderSurfaceListType; 75 typedef RenderSurfaceLayerList RenderSurfaceListType;
74 typedef LayerList LayerListType; 76 typedef LayerList LayerListType;
75 typedef RenderSurface RenderSurfaceType; 77 typedef RenderSurface RenderSurfaceType;
78 typedef std::vector<std::pair<int64_t, gfx::Rect> > DrawFrameRequestRectsType;
76 79
77 enum LayerIdLabels { 80 enum LayerIdLabels {
78 INVALID_ID = -1, 81 INVALID_ID = -1,
79 }; 82 };
80 83
81 static scoped_refptr<Layer> Create(); 84 static scoped_refptr<Layer> Create();
82 85
83 int id() const { return layer_id_; } 86 int id() const { return layer_id_; }
84 87
85 Layer* RootLayer(); 88 Layer* RootLayer();
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 void SetNonFastScrollableRegion(const Region& non_fast_scrollable_region); 292 void SetNonFastScrollableRegion(const Region& non_fast_scrollable_region);
290 const Region& non_fast_scrollable_region() const { 293 const Region& non_fast_scrollable_region() const {
291 return non_fast_scrollable_region_; 294 return non_fast_scrollable_region_;
292 } 295 }
293 296
294 void SetTouchEventHandlerRegion(const Region& touch_event_handler_region); 297 void SetTouchEventHandlerRegion(const Region& touch_event_handler_region);
295 const Region& touch_event_handler_region() const { 298 const Region& touch_event_handler_region() const {
296 return touch_event_handler_region_; 299 return touch_event_handler_region_;
297 } 300 }
298 301
302 void SetDrawFrameRequestRects(const DrawFrameRequestRectsType& rects);
303 const DrawFrameRequestRectsType& draw_frame_request_rects() const {
304 return draw_frame_request_rects_;
305 }
306
299 void set_did_scroll_callback(const base::Closure& callback) { 307 void set_did_scroll_callback(const base::Closure& callback) {
300 did_scroll_callback_ = callback; 308 did_scroll_callback_ = callback;
301 } 309 }
302 310
303 void SetDrawCheckerboardForMissingTiles(bool checkerboard); 311 void SetDrawCheckerboardForMissingTiles(bool checkerboard);
304 bool draw_checkerboard_for_missing_tiles() const { 312 bool draw_checkerboard_for_missing_tiles() const {
305 return draw_checkerboard_for_missing_tiles_; 313 return draw_checkerboard_for_missing_tiles_;
306 } 314 }
307 315
308 void SetForceRenderSurface(bool force_render_surface); 316 void SetForceRenderSurface(bool force_render_surface);
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 bool masks_to_bounds_ : 1; 599 bool masks_to_bounds_ : 1;
592 bool contents_opaque_ : 1; 600 bool contents_opaque_ : 1;
593 bool double_sided_ : 1; 601 bool double_sided_ : 1;
594 bool should_flatten_transform_ : 1; 602 bool should_flatten_transform_ : 1;
595 bool use_parent_backface_visibility_ : 1; 603 bool use_parent_backface_visibility_ : 1;
596 bool draw_checkerboard_for_missing_tiles_ : 1; 604 bool draw_checkerboard_for_missing_tiles_ : 1;
597 bool force_render_surface_ : 1; 605 bool force_render_surface_ : 1;
598 bool transform_is_invertible_ : 1; 606 bool transform_is_invertible_ : 1;
599 Region non_fast_scrollable_region_; 607 Region non_fast_scrollable_region_;
600 Region touch_event_handler_region_; 608 Region touch_event_handler_region_;
609 DrawFrameRequestRectsType draw_frame_request_rects_;
601 gfx::PointF position_; 610 gfx::PointF position_;
602 SkColor background_color_; 611 SkColor background_color_;
603 float opacity_; 612 float opacity_;
604 SkXfermode::Mode blend_mode_; 613 SkXfermode::Mode blend_mode_;
605 FilterOperations filters_; 614 FilterOperations filters_;
606 FilterOperations background_filters_; 615 FilterOperations background_filters_;
607 LayerPositionConstraint position_constraint_; 616 LayerPositionConstraint position_constraint_;
608 Layer* scroll_parent_; 617 Layer* scroll_parent_;
609 scoped_ptr<std::set<Layer*> > scroll_children_; 618 scoped_ptr<std::set<Layer*> > scroll_children_;
610 619
(...skipping 18 matching lines...) Expand all
629 DrawProperties<Layer> draw_properties_; 638 DrawProperties<Layer> draw_properties_;
630 639
631 PaintProperties paint_properties_; 640 PaintProperties paint_properties_;
632 641
633 DISALLOW_COPY_AND_ASSIGN(Layer); 642 DISALLOW_COPY_AND_ASSIGN(Layer);
634 }; 643 };
635 644
636 } // namespace cc 645 } // namespace cc
637 646
638 #endif // CC_LAYERS_LAYER_H_ 647 #endif // CC_LAYERS_LAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698