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_H_ | 5 #ifndef UI_GFX_COMPOSITOR_COMPOSITOR_H_ |
6 #define UI_GFX_COMPOSITOR_COMPOSITOR_H_ | 6 #define UI_GFX_COMPOSITOR_COMPOSITOR_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "ui/gfx/transform.h" | 10 #include "ui/gfx/transform.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // |overall_size| gives the total size of texture. | 46 // |overall_size| gives the total size of texture. |
47 virtual void SetCanvas(const SkCanvas& canvas, | 47 virtual void SetCanvas(const SkCanvas& canvas, |
48 const gfx::Point& origin, | 48 const gfx::Point& origin, |
49 const gfx::Size& overall_size) = 0; | 49 const gfx::Size& overall_size) = 0; |
50 | 50 |
51 // Draws the texture. | 51 // Draws the texture. |
52 virtual void Draw(const ui::TextureDrawParams& params) = 0; | 52 virtual void Draw(const ui::TextureDrawParams& params) = 0; |
53 | 53 |
54 // Draws the portion of the texture contained within clip_bounds | 54 // Draws the portion of the texture contained within clip_bounds |
55 virtual void Draw(const ui::TextureDrawParams& params, | 55 virtual void Draw(const ui::TextureDrawParams& params, |
56 const gfx::Rect& clip_bounds) = 0; | 56 const gfx::Rect& clip_bounds_in_texture) = 0; |
57 | 57 |
58 protected: | 58 protected: |
59 virtual ~Texture() {} | 59 virtual ~Texture() {} |
60 | 60 |
61 private: | 61 private: |
62 friend class base::RefCounted<Texture>; | 62 friend class base::RefCounted<Texture>; |
63 }; | 63 }; |
64 | 64 |
65 // Compositor object to take care of GPU painting. | 65 // Compositor object to take care of GPU painting. |
66 // A Browser compositor object is responsible for generating the final | 66 // A Browser compositor object is responsible for generating the final |
(...skipping 28 matching lines...) Expand all Loading... |
95 protected: | 95 protected: |
96 virtual ~Compositor() {} | 96 virtual ~Compositor() {} |
97 | 97 |
98 private: | 98 private: |
99 friend class base::RefCounted<Compositor>; | 99 friend class base::RefCounted<Compositor>; |
100 }; | 100 }; |
101 | 101 |
102 } // namespace ui | 102 } // namespace ui |
103 | 103 |
104 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_H_ | 104 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_H_ |
OLD | NEW |