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

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

Issue 373113003: Keeping track of descendants that draw content instead of recalcualting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made DrawsContent non-virtual 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
« no previous file with comments | « no previous file | cc/layers/delegated_renderer_layer.cc » ('j') | cc/layers/image_layer.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_DELEGATED_RENDERER_LAYER_H_ 5 #ifndef CC_LAYERS_DELEGATED_RENDERER_LAYER_H_
6 #define CC_LAYERS_DELEGATED_RENDERER_LAYER_H_ 6 #define CC_LAYERS_DELEGATED_RENDERER_LAYER_H_
7 7
8 #include "base/containers/hash_tables.h" 8 #include "base/containers/hash_tables.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 14 matching lines...) Expand all
25 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) 25 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
26 OVERRIDE; 26 OVERRIDE;
27 virtual void SetLayerTreeHost(LayerTreeHost* host) OVERRIDE; 27 virtual void SetLayerTreeHost(LayerTreeHost* host) OVERRIDE;
28 virtual bool Update(ResourceUpdateQueue* queue, 28 virtual bool Update(ResourceUpdateQueue* queue,
29 const OcclusionTracker<Layer>* occlusion) OVERRIDE; 29 const OcclusionTracker<Layer>* occlusion) OVERRIDE;
30 virtual void PushPropertiesTo(LayerImpl* impl) OVERRIDE; 30 virtual void PushPropertiesTo(LayerImpl* impl) OVERRIDE;
31 31
32 // Called by the DelegatedFrameProvider when a new frame is available to be 32 // Called by the DelegatedFrameProvider when a new frame is available to be
33 // picked up. 33 // picked up.
34 void ProviderHasNewFrame(); 34 void ProviderHasNewFrame();
35 virtual int NumDescendantsThatDrawContent() const OVERRIDE;
danakj 2014/07/14 14:57:45 Oh, instead of this, can we put HasDelegatedConten
awoloszyn 2014/07/14 19:38:32 Done.
35 36
36 protected: 37 protected:
37 DelegatedRendererLayer( 38 DelegatedRendererLayer(
38 const scoped_refptr<DelegatedFrameProvider>& frame_provider); 39 const scoped_refptr<DelegatedFrameProvider>& frame_provider);
39 virtual ~DelegatedRendererLayer(); 40 virtual ~DelegatedRendererLayer();
40 41
41 private: 42 private:
42 scoped_refptr<DelegatedFrameProvider> frame_provider_; 43 scoped_refptr<DelegatedFrameProvider> frame_provider_;
43 44
44 bool should_collect_new_frame_; 45 bool should_collect_new_frame_;
45 46
46 DelegatedFrameData* frame_data_; 47 DelegatedFrameData* frame_data_;
47 gfx::RectF frame_damage_; 48 gfx::RectF frame_damage_;
48 49
49 scoped_refptr<BlockingTaskRunner> main_thread_runner_; 50 scoped_refptr<BlockingTaskRunner> main_thread_runner_;
50 base::WeakPtrFactory<DelegatedRendererLayer> weak_ptrs_; 51 base::WeakPtrFactory<DelegatedRendererLayer> weak_ptrs_;
51 52
52 DISALLOW_COPY_AND_ASSIGN(DelegatedRendererLayer); 53 DISALLOW_COPY_AND_ASSIGN(DelegatedRendererLayer);
53 }; 54 };
54 55
55 } // namespace cc 56 } // namespace cc
56 57
57 #endif // CC_LAYERS_DELEGATED_RENDERER_LAYER_H_ 58 #endif // CC_LAYERS_DELEGATED_RENDERER_LAYER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/delegated_renderer_layer.cc » ('j') | cc/layers/image_layer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698