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 | 60 |
61 // ui::ResourceProvider implementation. | 61 // ui::ResourceProvider implementation. |
62 cc::UIResourceId CreateUIResource(cc::UIResourceClient* client) override; | 62 cc::UIResourceId CreateUIResource(cc::UIResourceClient* client) override; |
63 void DeleteUIResource(cc::UIResourceId resource_id) override; | 63 void DeleteUIResource(cc::UIResourceId resource_id) override; |
64 bool SupportsETC1NonPowerOfTwo() const override; | 64 bool SupportsETC1NonPowerOfTwo() const override; |
65 | 65 |
66 private: | 66 private: |
67 // Compositor implementation. | 67 // Compositor implementation. |
68 void SetRootLayer(scoped_refptr<cc::Layer> root) override; | 68 void SetRootLayer(scoped_refptr<cc::Layer> root) override; |
69 void SetSurface(jobject surface) override; | 69 void SetSurface(jobject surface) override; |
70 void setDeviceScaleFactor(float factor) override; | |
71 void SetWindowBounds(const gfx::Size& size) override; | 70 void SetWindowBounds(const gfx::Size& size) override; |
72 void SetHasTransparentBackground(bool flag) override; | 71 void SetHasTransparentBackground(bool flag) override; |
73 void SetNeedsComposite() override; | 72 void SetNeedsComposite() override; |
74 ui::UIResourceProvider& GetUIResourceProvider() override; | 73 ui::UIResourceProvider& GetUIResourceProvider() override; |
75 ui::ResourceManager& GetResourceManager() override; | 74 ui::ResourceManager& GetResourceManager() override; |
76 | 75 |
77 // LayerTreeHostClient implementation. | 76 // LayerTreeHostClient implementation. |
78 void WillBeginMainFrame() override {} | 77 void WillBeginMainFrame() override {} |
79 void DidBeginMainFrame() override {} | 78 void DidBeginMainFrame() override {} |
80 void BeginMainFrame(const cc::BeginFrameArgs& args) override {} | 79 void BeginMainFrame(const cc::BeginFrameArgs& args) override {} |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 134 |
136 // Destruction order matters here: | 135 // Destruction order matters here: |
137 std::unique_ptr<cc::AnimationHost> animation_host_; | 136 std::unique_ptr<cc::AnimationHost> animation_host_; |
138 std::unique_ptr<cc::LayerTreeHost> host_; | 137 std::unique_ptr<cc::LayerTreeHost> host_; |
139 ui::ResourceManagerImpl resource_manager_; | 138 ui::ResourceManagerImpl resource_manager_; |
140 | 139 |
141 std::unique_ptr<cc::Display> display_; | 140 std::unique_ptr<cc::Display> display_; |
142 | 141 |
143 gfx::Size size_; | 142 gfx::Size size_; |
144 bool has_transparent_background_; | 143 bool has_transparent_background_; |
145 float device_scale_factor_; | |
146 | 144 |
147 ANativeWindow* window_; | 145 ANativeWindow* window_; |
148 gpu::SurfaceHandle surface_handle_; | 146 gpu::SurfaceHandle surface_handle_; |
149 | 147 |
150 CompositorClient* client_; | 148 CompositorClient* client_; |
151 | 149 |
152 gfx::NativeWindow root_window_; | 150 gfx::NativeWindow root_window_; |
153 | 151 |
154 // Whether we need to update animations on the next composite. | 152 // Whether we need to update animations on the next composite. |
155 bool needs_animate_; | 153 bool needs_animate_; |
(...skipping 12 matching lines...) Expand all Loading... |
168 | 166 |
169 gpu::Capabilities gpu_capabilities_; | 167 gpu::Capabilities gpu_capabilities_; |
170 base::WeakPtrFactory<CompositorImpl> weak_factory_; | 168 base::WeakPtrFactory<CompositorImpl> weak_factory_; |
171 | 169 |
172 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); | 170 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); |
173 }; | 171 }; |
174 | 172 |
175 } // namespace content | 173 } // namespace content |
176 | 174 |
177 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ | 175 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ |
OLD | NEW |