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

Side by Side Diff: cc/delegated_renderer_layer.h

Issue 12774006: cc: Chromify Layer and LayerImpl classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: MoreAndroidCompilings Created 7 years, 9 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/debug_rect_history.cc ('k') | cc/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_DELEGATED_RENDERER_LAYER_H_ 5 #ifndef CC_DELEGATED_RENDERER_LAYER_H_
6 #define CC_DELEGATED_RENDERER_LAYER_H_ 6 #define CC_DELEGATED_RENDERER_LAYER_H_
7 7
8 #include "cc/cc_export.h" 8 #include "cc/cc_export.h"
9 #include "cc/layer.h" 9 #include "cc/layer.h"
10 #include "cc/transferable_resource.h" 10 #include "cc/transferable_resource.h"
11 11
12 namespace cc { 12 namespace cc {
13 class DelegatedFrameData; 13 class DelegatedFrameData;
14 14
15 class CC_EXPORT DelegatedRendererLayer : public Layer { 15 class CC_EXPORT DelegatedRendererLayer : public Layer {
16 public: 16 public:
17 static scoped_refptr<DelegatedRendererLayer> Create(); 17 static scoped_refptr<DelegatedRendererLayer> Create();
18 18
19 virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl* tree_impl) 19 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
20 OVERRIDE; 20 OVERRIDE;
21 virtual void pushPropertiesTo(LayerImpl* impl) OVERRIDE; 21 virtual void PushPropertiesTo(LayerImpl* impl) OVERRIDE;
22 virtual bool drawsContent() const OVERRIDE; 22 virtual bool DrawsContent() const OVERRIDE;
23 23
24 // Set the size at which the frame should be displayed, with the origin at the 24 // Set the size at which the frame should be displayed, with the origin at the
25 // layer's origin. This must always contain at least the layer's bounds. A 25 // layer's origin. This must always contain at least the layer's bounds. A
26 // value of (0, 0) implies that the frame should be displayed to fit exactly 26 // value of (0, 0) implies that the frame should be displayed to fit exactly
27 // in the layer's bounds. 27 // in the layer's bounds.
28 void SetDisplaySize(gfx::Size size); 28 void SetDisplaySize(gfx::Size size);
29 29
30 void SetFrameData(scoped_ptr<DelegatedFrameData> frame_data); 30 void SetFrameData(scoped_ptr<DelegatedFrameData> frame_data);
31 31
32 // Passes ownership of any unused resources that had been given by the child 32 // Passes ownership of any unused resources that had been given by the child
33 // compositor to the given array, so they can be given back to the child. 33 // compositor to the given array, so they can be given back to the child.
34 void TakeUnusedResourcesForChildCompositor(TransferableResourceArray* array); 34 void TakeUnusedResourcesForChildCompositor(TransferableResourceArray* array);
35 35
36 protected: 36 protected:
37 DelegatedRendererLayer(); 37 DelegatedRendererLayer();
38 virtual ~DelegatedRendererLayer(); 38 virtual ~DelegatedRendererLayer();
39 39
40 private: 40 private:
41 scoped_ptr<DelegatedFrameData> frame_data_; 41 scoped_ptr<DelegatedFrameData> frame_data_;
42 gfx::RectF damage_in_frame_; 42 gfx::RectF damage_in_frame_;
43 gfx::Size frame_size_; 43 gfx::Size frame_size_;
44 gfx::Size display_size_; 44 gfx::Size display_size_;
45 TransferableResourceArray unused_resources_for_child_compositor_; 45 TransferableResourceArray unused_resources_for_child_compositor_;
46 }; 46 };
47 47
48 } 48 }
49 #endif // CC_DELEGATED_RENDERER_LAYER_H_ 49 #endif // CC_DELEGATED_RENDERER_LAYER_H_
OLDNEW
« no previous file with comments | « cc/debug_rect_history.cc ('k') | cc/delegated_renderer_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698