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

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

Issue 147603006: [#7] Resubmitted - Pass gfx structs by const ref (gfx::Size) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resubmit 145313006 Created 6 years, 10 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/base/tiling_data_unittest.cc ('k') | cc/layers/delegated_renderer_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 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 15 matching lines...) Expand all
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* occlusion) OVERRIDE; 29 const OcclusionTracker* occlusion) OVERRIDE;
30 virtual void PushPropertiesTo(LayerImpl* impl) OVERRIDE; 30 virtual void PushPropertiesTo(LayerImpl* impl) OVERRIDE;
31 31
32 // Set the size at which the frame should be displayed, with the origin at the 32 // Set the size at which the frame should be displayed, with the origin at the
33 // layer's origin. This must always contain at least the layer's bounds. A 33 // layer's origin. This must always contain at least the layer's bounds. A
34 // value of (0, 0) implies that the frame should be displayed to fit exactly 34 // value of (0, 0) implies that the frame should be displayed to fit exactly
35 // in the layer's bounds. 35 // in the layer's bounds.
36 void SetDisplaySize(gfx::Size size); 36 void SetDisplaySize(const gfx::Size& size);
37 37
38 // Called by the DelegatedFrameProvider when a new frame is available to be 38 // Called by the DelegatedFrameProvider when a new frame is available to be
39 // picked up. 39 // picked up.
40 void ProviderHasNewFrame(); 40 void ProviderHasNewFrame();
41 41
42 protected: 42 protected:
43 DelegatedRendererLayer( 43 DelegatedRendererLayer(
44 const scoped_refptr<DelegatedFrameProvider>& frame_provider); 44 const scoped_refptr<DelegatedFrameProvider>& frame_provider);
45 virtual ~DelegatedRendererLayer(); 45 virtual ~DelegatedRendererLayer();
46 46
47 private: 47 private:
48 scoped_refptr<DelegatedFrameProvider> frame_provider_; 48 scoped_refptr<DelegatedFrameProvider> frame_provider_;
49 49
50 bool should_collect_new_frame_; 50 bool should_collect_new_frame_;
51 51
52 DelegatedFrameData* frame_data_; 52 DelegatedFrameData* frame_data_;
53 gfx::RectF frame_damage_; 53 gfx::RectF frame_damage_;
54 54
55 gfx::Size display_size_; 55 gfx::Size display_size_;
56 56
57 scoped_refptr<BlockingTaskRunner> main_thread_runner_; 57 scoped_refptr<BlockingTaskRunner> main_thread_runner_;
58 base::WeakPtrFactory<DelegatedRendererLayer> weak_ptrs_; 58 base::WeakPtrFactory<DelegatedRendererLayer> weak_ptrs_;
59 59
60 DISALLOW_COPY_AND_ASSIGN(DelegatedRendererLayer); 60 DISALLOW_COPY_AND_ASSIGN(DelegatedRendererLayer);
61 }; 61 };
62 62
63 } // namespace cc 63 } // namespace cc
64 64
65 #endif // CC_LAYERS_DELEGATED_RENDERER_LAYER_H_ 65 #endif // CC_LAYERS_DELEGATED_RENDERER_LAYER_H_
OLDNEW
« no previous file with comments | « cc/base/tiling_data_unittest.cc ('k') | cc/layers/delegated_renderer_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698