| 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 "base/observer_list.h" | 10 #include "base/observer_list.h" |
| 11 #include "ui/gfx/compositor/compositor_export.h" | 11 #include "ui/gfx/compositor/compositor_export.h" |
| 12 #include "ui/gfx/transform.h" | 12 #include "ui/gfx/transform.h" |
| 13 #include "ui/gfx/native_widget_types.h" | 13 #include "ui/gfx/native_widget_types.h" |
| 14 #include "ui/gfx/size.h" | 14 #include "ui/gfx/size.h" |
| 15 | 15 |
| 16 class SkBitmap; | 16 class SkBitmap; |
| 17 class SkCanvas; | 17 class SkCanvas; |
| 18 namespace gfx { | 18 namespace gfx { |
| 19 class Point; | 19 class Point; |
| 20 class Rect; | 20 class Rect; |
| 21 class ScopedMakeCurrent; |
| 21 } | 22 } |
| 22 | 23 |
| 23 namespace ui { | 24 namespace ui { |
| 24 | 25 |
| 25 class CompositorObserver; | 26 class CompositorObserver; |
| 26 class Layer; | 27 class Layer; |
| 27 | 28 |
| 28 class SharedResources { | 29 class SharedResources { |
| 29 public: | 30 public: |
| 30 virtual ~SharedResources() {} | 31 virtual ~SharedResources() {} |
| 31 virtual bool MakeSharedContextCurrent() = 0; | 32 |
| 33 // Creates an instance of ScopedMakeCurrent. |
| 34 // Note: Caller is responsible for managing lifetime of returned pointer. |
| 35 virtual gfx::ScopedMakeCurrent* GetScopedMakeCurrent() = 0; |
| 36 |
| 32 virtual void* GetDisplay() = 0; | 37 virtual void* GetDisplay() = 0; |
| 33 }; | 38 }; |
| 34 | 39 |
| 35 struct TextureDrawParams { | 40 struct TextureDrawParams { |
| 36 TextureDrawParams(); | 41 TextureDrawParams(); |
| 37 | 42 |
| 38 // The transform to be applied to the texture. | 43 // The transform to be applied to the texture. |
| 39 ui::Transform transform; | 44 ui::Transform transform; |
| 40 | 45 |
| 41 // If this is true, then the texture is blended with the pixels behind it. | 46 // If this is true, then the texture is blended with the pixels behind it. |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 // calls to it. | 201 // calls to it. |
| 197 static ui::Compositor*(*compositor_factory_)( | 202 static ui::Compositor*(*compositor_factory_)( |
| 198 ui::CompositorDelegate* delegate); | 203 ui::CompositorDelegate* delegate); |
| 199 | 204 |
| 200 friend class base::RefCounted<Compositor>; | 205 friend class base::RefCounted<Compositor>; |
| 201 }; | 206 }; |
| 202 | 207 |
| 203 } // namespace ui | 208 } // namespace ui |
| 204 | 209 |
| 205 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_H_ | 210 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_H_ |
| OLD | NEW |