OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 UI_GFX_COMPOSITOR_COMPOSITOR_CC_H_ | 5 #ifndef UI_GFX_COMPOSITOR_COMPOSITOR_CC_H_ |
6 #define UI_GFX_COMPOSITOR_COMPOSITOR_CC_H_ | 6 #define UI_GFX_COMPOSITOR_COMPOSITOR_CC_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 virtual void SetCanvas(const SkCanvas& canvas, | 60 virtual void SetCanvas(const SkCanvas& canvas, |
61 const gfx::Point& origin, | 61 const gfx::Point& origin, |
62 const gfx::Size& overall_size) OVERRIDE; | 62 const gfx::Size& overall_size) OVERRIDE; |
63 | 63 |
64 virtual void Draw(const ui::TextureDrawParams& params, | 64 virtual void Draw(const ui::TextureDrawParams& params, |
65 const gfx::Rect& clip_bounds_in_texture) OVERRIDE; | 65 const gfx::Rect& clip_bounds_in_texture) OVERRIDE; |
66 | 66 |
67 virtual void Update() = 0; | 67 virtual void Update() = 0; |
68 unsigned int texture_id() const { return texture_id_; } | 68 unsigned int texture_id() const { return texture_id_; } |
69 bool flipped() const { return flipped_; } | 69 bool flipped() const { return flipped_; } |
| 70 const gfx::Size& size() const { return size_; } |
70 | 71 |
71 protected: | 72 protected: |
72 unsigned int texture_id_; | 73 unsigned int texture_id_; |
73 bool flipped_; | 74 bool flipped_; |
| 75 gfx::Size size_; |
74 DISALLOW_COPY_AND_ASSIGN(TextureCC); | 76 DISALLOW_COPY_AND_ASSIGN(TextureCC); |
75 }; | 77 }; |
76 | 78 |
77 class COMPOSITOR_EXPORT CompositorCC | 79 class COMPOSITOR_EXPORT CompositorCC |
78 : public Compositor, | 80 : public Compositor, |
79 NON_EXPORTED_BASE(public WebKit::WebLayerTreeViewClient), | 81 NON_EXPORTED_BASE(public WebKit::WebLayerTreeViewClient), |
80 NON_EXPORTED_BASE(public WebKit::WebLayerClient) { | 82 NON_EXPORTED_BASE(public WebKit::WebLayerClient) { |
81 public: | 83 public: |
82 CompositorCC(CompositorDelegate* delegate, | 84 CompositorCC(CompositorDelegate* delegate, |
83 gfx::AcceleratedWidget widget, | 85 gfx::AcceleratedWidget widget, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 gfx::AcceleratedWidget widget_; | 117 gfx::AcceleratedWidget widget_; |
116 WebKit::WebLayer root_web_layer_; | 118 WebKit::WebLayer root_web_layer_; |
117 WebKit::WebLayerTreeView host_; | 119 WebKit::WebLayerTreeView host_; |
118 | 120 |
119 DISALLOW_COPY_AND_ASSIGN(CompositorCC); | 121 DISALLOW_COPY_AND_ASSIGN(CompositorCC); |
120 }; | 122 }; |
121 | 123 |
122 } // namespace ui | 124 } // namespace ui |
123 | 125 |
124 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_CC_H_ | 126 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_CC_H_ |
OLD | NEW |