OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_COMPOSITOR_COMPOSITOR_H_ | 5 #ifndef UI_COMPOSITOR_COMPOSITOR_H_ |
6 #define UI_COMPOSITOR_COMPOSITOR_H_ | 6 #define UI_COMPOSITOR_COMPOSITOR_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/containers/hash_tables.h" | 11 #include "base/containers/hash_tables.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
15 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
17 #include "cc/output/begin_frame_args.h" | 17 #include "cc/output/begin_frame_args.h" |
18 #include "cc/surfaces/surface_sequence.h" | 18 #include "cc/surfaces/surface_sequence.h" |
19 #include "cc/trees/layer_tree_host_client.h" | 19 #include "cc/trees/layer_tree_host_client.h" |
20 #include "cc/trees/layer_tree_host_single_thread_client.h" | 20 #include "cc/trees/layer_tree_host_single_thread_client.h" |
21 #include "third_party/skia/include/core/SkColor.h" | 21 #include "third_party/skia/include/core/SkColor.h" |
22 #include "ui/compositor/compositor_animation_observer.h" | 22 #include "ui/compositor/compositor_animation_observer.h" |
23 #include "ui/compositor/compositor_export.h" | 23 #include "ui/compositor/compositor_export.h" |
24 #include "ui/compositor/compositor_observer.h" | 24 #include "ui/compositor/compositor_observer.h" |
25 #include "ui/compositor/layer_animator_collection.h" | 25 #include "ui/compositor/layer_animator_collection.h" |
26 #include "ui/gfx/geometry/size.h" | 26 #include "ui/gfx/geometry/size.h" |
27 #include "ui/gfx/geometry/vector2d.h" | 27 #include "ui/gfx/geometry/vector2d.h" |
| 28 #include "ui/gfx/gpu_memory_buffer.h" |
28 #include "ui/gfx/native_widget_types.h" | 29 #include "ui/gfx/native_widget_types.h" |
29 | 30 |
30 namespace base { | 31 namespace base { |
31 class MessageLoopProxy; | 32 class MessageLoopProxy; |
32 class RunLoop; | 33 class RunLoop; |
33 } | 34 } |
34 | 35 |
35 namespace cc { | 36 namespace cc { |
36 class ContextProvider; | 37 class ContextProvider; |
37 class Layer; | 38 class Layer; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 SharedMainThreadContextProvider() = 0; | 89 SharedMainThreadContextProvider() = 0; |
89 | 90 |
90 // Destroys per-compositor data. | 91 // Destroys per-compositor data. |
91 virtual void RemoveCompositor(Compositor* compositor) = 0; | 92 virtual void RemoveCompositor(Compositor* compositor) = 0; |
92 | 93 |
93 // When true, the factory uses test contexts that do not do real GL | 94 // When true, the factory uses test contexts that do not do real GL |
94 // operations. | 95 // operations. |
95 virtual bool DoesCreateTestContexts() = 0; | 96 virtual bool DoesCreateTestContexts() = 0; |
96 | 97 |
97 // Returns the OpenGL target to use for image textures. | 98 // Returns the OpenGL target to use for image textures. |
98 virtual uint32 GetImageTextureTarget() = 0; | 99 virtual uint32 GetImageTextureTarget(gfx::GpuMemoryBuffer::Format format, |
| 100 gfx::GpuMemoryBuffer::Usage usage) = 0; |
99 | 101 |
100 // Gets the shared bitmap manager for software mode. | 102 // Gets the shared bitmap manager for software mode. |
101 virtual cc::SharedBitmapManager* GetSharedBitmapManager() = 0; | 103 virtual cc::SharedBitmapManager* GetSharedBitmapManager() = 0; |
102 | 104 |
103 // Gets the GPU memory buffer manager. | 105 // Gets the GPU memory buffer manager. |
104 virtual gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() = 0; | 106 virtual gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() = 0; |
105 | 107 |
106 // Gets the task graph runner. | 108 // Gets the task graph runner. |
107 virtual cc::TaskGraphRunner* GetTaskGraphRunner() = 0; | 109 virtual cc::TaskGraphRunner* GetTaskGraphRunner() = 0; |
108 | 110 |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 cc::BeginFrameArgs missed_begin_frame_args_; | 358 cc::BeginFrameArgs missed_begin_frame_args_; |
357 | 359 |
358 base::WeakPtrFactory<Compositor> weak_ptr_factory_; | 360 base::WeakPtrFactory<Compositor> weak_ptr_factory_; |
359 | 361 |
360 DISALLOW_COPY_AND_ASSIGN(Compositor); | 362 DISALLOW_COPY_AND_ASSIGN(Compositor); |
361 }; | 363 }; |
362 | 364 |
363 } // namespace ui | 365 } // namespace ui |
364 | 366 |
365 #endif // UI_COMPOSITOR_COMPOSITOR_H_ | 367 #endif // UI_COMPOSITOR_COMPOSITOR_H_ |
OLD | NEW |