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

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

Issue 12426024: cc: Switch RenderingStats collection in Layer::Update() to RenderingStatsInstrumentation (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 190965 Created 7 years, 8 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
« no previous file with comments | « cc/layers/image_layer.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 #include <vector> 9 #include <vector>
10 10
(...skipping 25 matching lines...) Expand all
36 class Animation; 36 class Animation;
37 struct AnimationEvent; 37 struct AnimationEvent;
38 class LayerAnimationDelegate; 38 class LayerAnimationDelegate;
39 class LayerImpl; 39 class LayerImpl;
40 class LayerTreeHost; 40 class LayerTreeHost;
41 class LayerTreeImpl; 41 class LayerTreeImpl;
42 class PriorityCalculator; 42 class PriorityCalculator;
43 class ResourceUpdateQueue; 43 class ResourceUpdateQueue;
44 class ScrollbarLayer; 44 class ScrollbarLayer;
45 struct AnimationEvent; 45 struct AnimationEvent;
46 struct RenderingStats; 46 class RenderingStatsInstrumentation;
47 47
48 // Base class for composited layers. Special layer types are derived from 48 // Base class for composited layers. Special layer types are derived from
49 // this class. 49 // this class.
50 class CC_EXPORT Layer : public base::RefCounted<Layer>, 50 class CC_EXPORT Layer : public base::RefCounted<Layer>,
51 public LayerAnimationValueObserver { 51 public LayerAnimationValueObserver {
52 public: 52 public:
53 typedef std::vector<scoped_refptr<Layer> > LayerList; 53 typedef std::vector<scoped_refptr<Layer> > LayerList;
54 enum LayerIdLabels { 54 enum LayerIdLabels {
55 PINCH_ZOOM_ROOT_SCROLL_LAYER_ID = -2, 55 PINCH_ZOOM_ROOT_SCROLL_LAYER_ID = -2,
56 INVALID_ID = -1, 56 INVALID_ID = -1,
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 260
261 bool has_mask() const { return !!mask_layer_; } 261 bool has_mask() const { return !!mask_layer_; }
262 bool has_replica() const { return !!replica_layer_; } 262 bool has_replica() const { return !!replica_layer_; }
263 bool replica_has_mask() const { 263 bool replica_has_mask() const {
264 return replica_layer_ && (mask_layer_ || replica_layer_->mask_layer_); 264 return replica_layer_ && (mask_layer_ || replica_layer_->mask_layer_);
265 } 265 }
266 266
267 // These methods typically need to be overwritten by derived classes. 267 // These methods typically need to be overwritten by derived classes.
268 virtual bool DrawsContent() const; 268 virtual bool DrawsContent() const;
269 virtual void Update(ResourceUpdateQueue* queue, 269 virtual void Update(ResourceUpdateQueue* queue,
270 const OcclusionTracker* occlusion, 270 const OcclusionTracker* occlusion) {}
271 RenderingStats* stats) {}
272 virtual bool NeedMoreUpdates(); 271 virtual bool NeedMoreUpdates();
273 virtual void SetIsMask(bool is_mask) {} 272 virtual void SetIsMask(bool is_mask) {}
274 273
275 void SetDebugName(const std::string& debug_name); 274 void SetDebugName(const std::string& debug_name);
276 275
277 virtual void PushPropertiesTo(LayerImpl* layer); 276 virtual void PushPropertiesTo(LayerImpl* layer);
278 277
279 void ClearRenderSurface() { draw_properties_.render_surface.reset(); } 278 void ClearRenderSurface() { draw_properties_.render_surface.reset(); }
280 void CreateRenderSurface(); 279 void CreateRenderSurface();
281 280
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 bool BlocksPendingCommitRecursive() const; 362 bool BlocksPendingCommitRecursive() const;
364 363
365 virtual bool CanClipSelf() const; 364 virtual bool CanClipSelf() const;
366 365
367 // Constructs a LayerImpl of the correct runtime type for this Layer type. 366 // Constructs a LayerImpl of the correct runtime type for this Layer type.
368 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl); 367 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl);
369 368
370 bool NeedsDisplayForTesting() const { return needs_display_; } 369 bool NeedsDisplayForTesting() const { return needs_display_; }
371 void ResetNeedsDisplayForTesting() { needs_display_ = false; } 370 void ResetNeedsDisplayForTesting() { needs_display_ = false; }
372 371
372 RenderingStatsInstrumentation* rendering_stats_instrumentation() const;
373
373 protected: 374 protected:
374 friend class LayerImpl; 375 friend class LayerImpl;
375 friend class TreeSynchronizer; 376 friend class TreeSynchronizer;
376 virtual ~Layer(); 377 virtual ~Layer();
377 378
378 Layer(); 379 Layer();
379 380
380 void SetNeedsCommit(); 381 void SetNeedsCommit();
381 void SetNeedsFullTreeSync(); 382 void SetNeedsFullTreeSync();
382 383
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 WebKit::WebLayerScrollClient* layer_scroll_client_; 480 WebKit::WebLayerScrollClient* layer_scroll_client_;
480 481
481 DrawProperties<Layer, RenderSurface> draw_properties_; 482 DrawProperties<Layer, RenderSurface> draw_properties_;
482 483
483 DISALLOW_COPY_AND_ASSIGN(Layer); 484 DISALLOW_COPY_AND_ASSIGN(Layer);
484 }; 485 };
485 486
486 } // namespace cc 487 } // namespace cc
487 488
488 #endif // CC_LAYERS_LAYER_H_ 489 #endif // CC_LAYERS_LAYER_H_
OLDNEW
« no previous file with comments | « cc/layers/image_layer.cc ('k') | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698