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 18 matching lines...) Expand all Loading... |
29 virtual void SetCanvas(const SkCanvas& canvas, | 29 virtual void SetCanvas(const SkCanvas& canvas, |
30 const gfx::Point& origin, | 30 const gfx::Point& origin, |
31 const gfx::Size& overall_size) OVERRIDE; | 31 const gfx::Size& overall_size) OVERRIDE; |
32 | 32 |
33 // Draws the texture. | 33 // Draws the texture. |
34 // TODO(pkotwicz) merge these two methods into one, this method currently | 34 // TODO(pkotwicz) merge these two methods into one, this method currently |
35 // doesn't make sense in the context of windows | 35 // doesn't make sense in the context of windows |
36 virtual void Draw(const ui::TextureDrawParams& params) OVERRIDE; | 36 virtual void Draw(const ui::TextureDrawParams& params) OVERRIDE; |
37 | 37 |
38 virtual void Draw(const ui::TextureDrawParams& params, | 38 virtual void Draw(const ui::TextureDrawParams& params, |
39 const gfx::Rect& clip_bounds) OVERRIDE; | 39 const gfx::Rect& clip_bounds_in_texture) OVERRIDE; |
40 | 40 |
41 protected: | 41 protected: |
42 TextureGL(CompositorGL* compositor, const gfx::Size& size); | 42 TextureGL(CompositorGL* compositor, const gfx::Size& size); |
43 virtual ~TextureGL(); | 43 virtual ~TextureGL(); |
44 | 44 |
45 // Actually draws the texture. | 45 // Actually draws the texture. |
46 // Only the region defined by draw_bounds will be drawn. | 46 // Only the region defined by draw_bounds will be drawn. |
47 void DrawInternal(const TextureProgramGL& program, | 47 void DrawInternal(const TextureProgramGL& program, |
48 const ui::TextureDrawParams& params, | 48 const ui::TextureDrawParams& params, |
49 const gfx::Rect& clip_bounds); | 49 const gfx::Rect& clip_bounds_in_texture); |
50 | 50 |
51 unsigned int texture_id_; | 51 unsigned int texture_id_; |
52 gfx::Size size_; | 52 gfx::Size size_; |
53 CompositorGL* compositor_; | 53 CompositorGL* compositor_; |
54 | 54 |
55 private: | 55 private: |
56 DISALLOW_COPY_AND_ASSIGN(TextureGL); | 56 DISALLOW_COPY_AND_ASSIGN(TextureGL); |
57 }; | 57 }; |
58 | 58 |
59 class CompositorGL : public Compositor { | 59 class CompositorGL : public Compositor { |
(...skipping 24 matching lines...) Expand all Loading... |
84 | 84 |
85 // Keep track of whether compositing has started or not. | 85 // Keep track of whether compositing has started or not. |
86 bool started_; | 86 bool started_; |
87 | 87 |
88 DISALLOW_COPY_AND_ASSIGN(CompositorGL); | 88 DISALLOW_COPY_AND_ASSIGN(CompositorGL); |
89 }; | 89 }; |
90 | 90 |
91 } // namespace ui | 91 } // namespace ui |
92 | 92 |
93 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_GL_H_ | 93 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_GL_H_ |
OLD | NEW |