Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Side by Side Diff: content/browser/renderer_host/compositor_impl_android.h

Issue 888783002: Composite to cc::Display from ui::InProcessContextFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/cancelable_callback.h" 9 #include "base/cancelable_callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "cc/trees/layer_tree_host_client.h" 13 #include "cc/trees/layer_tree_host_client.h"
14 #include "cc/trees/layer_tree_host_single_thread_client.h" 14 #include "cc/trees/layer_tree_host_single_thread_client.h"
15 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
16 #include "content/common/gpu/client/context_provider_command_buffer.h" 16 #include "content/common/gpu/client/context_provider_command_buffer.h"
17 #include "content/public/browser/android/compositor.h" 17 #include "content/public/browser/android/compositor.h"
18 #include "gpu/command_buffer/common/capabilities.h" 18 #include "gpu/command_buffer/common/capabilities.h"
19 #include "third_party/khronos/GLES2/gl2.h" 19 #include "third_party/khronos/GLES2/gl2.h"
20 #include "ui/android/resources/resource_manager_impl.h" 20 #include "ui/android/resources/resource_manager_impl.h"
21 #include "ui/android/resources/ui_resource_provider.h" 21 #include "ui/android/resources/ui_resource_provider.h"
22 #include "ui/base/android/window_android_compositor.h" 22 #include "ui/base/android/window_android_compositor.h"
23 23
24 class SkBitmap; 24 class SkBitmap;
25 struct ANativeWindow; 25 struct ANativeWindow;
26 26
27 namespace cc { 27 namespace cc {
28 class Layer; 28 class Layer;
29 class LayerTreeHost; 29 class LayerTreeHost;
30 class OnscreenDisplayClient;
30 class SurfaceIdAllocator; 31 class SurfaceIdAllocator;
31 } 32 }
32 33
33 namespace content { 34 namespace content {
34 class CompositorClient; 35 class CompositorClient;
35 class OnscreenDisplayClient;
36 36
37 // ----------------------------------------------------------------------------- 37 // -----------------------------------------------------------------------------
38 // Browser-side compositor that manages a tree of content and UI layers. 38 // Browser-side compositor that manages a tree of content and UI layers.
39 // ----------------------------------------------------------------------------- 39 // -----------------------------------------------------------------------------
40 class CONTENT_EXPORT CompositorImpl 40 class CONTENT_EXPORT CompositorImpl
41 : public Compositor, 41 : public Compositor,
42 public cc::LayerTreeHostClient, 42 public cc::LayerTreeHostClient,
43 public cc::LayerTreeHostSingleThreadClient, 43 public cc::LayerTreeHostSingleThreadClient,
44 public ui::WindowAndroidCompositor { 44 public ui::WindowAndroidCompositor {
45 public: 45 public:
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 // root_layer_ is the persistent internal root layer, while subroot_layer_ 138 // root_layer_ is the persistent internal root layer, while subroot_layer_
139 // is the one attached by the compositor client. 139 // is the one attached by the compositor client.
140 scoped_refptr<cc::Layer> root_layer_; 140 scoped_refptr<cc::Layer> root_layer_;
141 scoped_refptr<cc::Layer> subroot_layer_; 141 scoped_refptr<cc::Layer> subroot_layer_;
142 142
143 scoped_ptr<cc::LayerTreeHost> host_; 143 scoped_ptr<cc::LayerTreeHost> host_;
144 ui::UIResourceProvider ui_resource_provider_; 144 ui::UIResourceProvider ui_resource_provider_;
145 ui::ResourceManagerImpl resource_manager_; 145 ui::ResourceManagerImpl resource_manager_;
146 146
147 scoped_ptr<OnscreenDisplayClient> display_client_; 147 scoped_ptr<cc::OnscreenDisplayClient> display_client_;
148 scoped_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; 148 scoped_ptr<cc::SurfaceIdAllocator> surface_id_allocator_;
149 149
150 gfx::Size size_; 150 gfx::Size size_;
151 bool has_transparent_background_; 151 bool has_transparent_background_;
152 float device_scale_factor_; 152 float device_scale_factor_;
153 153
154 ANativeWindow* window_; 154 ANativeWindow* window_;
155 int surface_id_; 155 int surface_id_;
156 156
157 CompositorClient* client_; 157 CompositorClient* client_;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 base::TimeTicks last_vsync_; 194 base::TimeTicks last_vsync_;
195 195
196 base::WeakPtrFactory<CompositorImpl> weak_factory_; 196 base::WeakPtrFactory<CompositorImpl> weak_factory_;
197 197
198 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); 198 DISALLOW_COPY_AND_ASSIGN(CompositorImpl);
199 }; 199 };
200 200
201 } // namespace content 201 } // namespace content
202 202
203 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ 203 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698