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_GL_H_ | 5 #ifndef UI_GFX_COMPOSITOR_COMPOSITOR_GL_H_ |
6 #define UI_GFX_COMPOSITOR_COMPOSITOR_GL_H_ | 6 #define UI_GFX_COMPOSITOR_COMPOSITOR_GL_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/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 public: | 70 public: |
71 TextureGL(); | 71 TextureGL(); |
72 | 72 |
73 virtual void SetCanvas(const SkCanvas& canvas, | 73 virtual void SetCanvas(const SkCanvas& canvas, |
74 const gfx::Point& origin, | 74 const gfx::Point& origin, |
75 const gfx::Size& overall_size) OVERRIDE; | 75 const gfx::Size& overall_size) OVERRIDE; |
76 | 76 |
77 virtual void Draw(const ui::TextureDrawParams& params, | 77 virtual void Draw(const ui::TextureDrawParams& params, |
78 const gfx::Rect& clip_bounds_in_texture) OVERRIDE; | 78 const gfx::Rect& clip_bounds_in_texture) OVERRIDE; |
79 | 79 |
| 80 const gfx::Size& size() const { return size_; } |
| 81 |
80 protected: | 82 protected: |
81 explicit TextureGL(const gfx::Size& size); | 83 explicit TextureGL(const gfx::Size& size); |
82 virtual ~TextureGL(); | 84 virtual ~TextureGL(); |
83 | 85 |
84 // Actually draws the texture. | 86 // Actually draws the texture. |
85 // Only the region defined by draw_bounds will be drawn. | 87 // Only the region defined by draw_bounds will be drawn. |
86 void DrawInternal(const TextureProgramGL& program, | 88 void DrawInternal(const TextureProgramGL& program, |
87 const ui::TextureDrawParams& params, | 89 const ui::TextureDrawParams& params, |
88 const gfx::Rect& clip_bounds_in_texture); | 90 const gfx::Rect& clip_bounds_in_texture); |
89 | 91 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 125 |
124 // Keep track of whether compositing has started or not. | 126 // Keep track of whether compositing has started or not. |
125 bool started_; | 127 bool started_; |
126 | 128 |
127 DISALLOW_COPY_AND_ASSIGN(CompositorGL); | 129 DISALLOW_COPY_AND_ASSIGN(CompositorGL); |
128 }; | 130 }; |
129 | 131 |
130 } // namespace ui | 132 } // namespace ui |
131 | 133 |
132 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_GL_H_ | 134 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_GL_H_ |
OLD | NEW |