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 CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 public: | 60 public: |
61 virtual void OnVSync(base::TimeTicks timebase, | 61 virtual void OnVSync(base::TimeTicks timebase, |
62 base::TimeDelta interval) = 0; | 62 base::TimeDelta interval) = 0; |
63 }; | 63 }; |
64 | 64 |
65 CompositorImpl(CompositorClient* client, gfx::NativeWindow root_window); | 65 CompositorImpl(CompositorClient* client, gfx::NativeWindow root_window); |
66 ~CompositorImpl() override; | 66 ~CompositorImpl() override; |
67 | 67 |
68 static bool IsInitialized(); | 68 static bool IsInitialized(); |
69 | 69 |
70 void PopulateGpuCapabilities(gpu::Capabilities gpu_capabilities); | |
71 | |
72 void AddObserver(VSyncObserver* observer); | 70 void AddObserver(VSyncObserver* observer); |
73 void RemoveObserver(VSyncObserver* observer); | 71 void RemoveObserver(VSyncObserver* observer); |
74 void OnNeedsBeginFramesChange(bool needs_begin_frames); | 72 void OnNeedsBeginFramesChange(bool needs_begin_frames); |
75 | 73 |
76 // ui::ResourceProvider implementation. | 74 // ui::ResourceProvider implementation. |
77 cc::UIResourceId CreateUIResource(cc::UIResourceClient* client) override; | 75 cc::UIResourceId CreateUIResource(cc::UIResourceClient* client) override; |
78 void DeleteUIResource(cc::UIResourceId resource_id) override; | 76 void DeleteUIResource(cc::UIResourceId resource_id) override; |
79 bool SupportsETC1NonPowerOfTwo() const override; | 77 bool SupportsETC1NonPowerOfTwo() const override; |
80 | 78 |
81 private: | 79 private: |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 gpu::Capabilities gpu_capabilities_; | 183 gpu::Capabilities gpu_capabilities_; |
186 bool needs_begin_frames_; | 184 bool needs_begin_frames_; |
187 base::WeakPtrFactory<CompositorImpl> weak_factory_; | 185 base::WeakPtrFactory<CompositorImpl> weak_factory_; |
188 | 186 |
189 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); | 187 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); |
190 }; | 188 }; |
191 | 189 |
192 } // namespace content | 190 } // namespace content |
193 | 191 |
194 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ | 192 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ |
OLD | NEW |