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

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

Issue 1921533008: Add support for OutputSurface for Vulkan on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix rebase error. Created 4 years, 7 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
« no previous file with comments | « no previous file | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 18 matching lines...) Expand all
29 29
30 class SkBitmap; 30 class SkBitmap;
31 struct ANativeWindow; 31 struct ANativeWindow;
32 32
33 namespace cc { 33 namespace cc {
34 class Layer; 34 class Layer;
35 class LayerTreeHost; 35 class LayerTreeHost;
36 class OnscreenDisplayClient; 36 class OnscreenDisplayClient;
37 class SurfaceIdAllocator; 37 class SurfaceIdAllocator;
38 class SurfaceManager; 38 class SurfaceManager;
39 class VulkanInProcessContextProvider;
39 } 40 }
40 41
41 namespace content { 42 namespace content {
42 class CompositorClient; 43 class CompositorClient;
43 44
44 // ----------------------------------------------------------------------------- 45 // -----------------------------------------------------------------------------
45 // Browser-side compositor that manages a tree of content and UI layers. 46 // Browser-side compositor that manages a tree of content and UI layers.
46 // ----------------------------------------------------------------------------- 47 // -----------------------------------------------------------------------------
47 class CONTENT_EXPORT CompositorImpl 48 class CONTENT_EXPORT CompositorImpl
48 : public Compositor, 49 : public Compositor,
49 public cc::LayerTreeHostClient, 50 public cc::LayerTreeHostClient,
50 public cc::LayerTreeHostSingleThreadClient, 51 public cc::LayerTreeHostSingleThreadClient,
51 public ui::UIResourceProvider, 52 public ui::UIResourceProvider,
52 public ui::WindowAndroidCompositor { 53 public ui::WindowAndroidCompositor {
53 public: 54 public:
54 class VSyncObserver { 55 class VSyncObserver {
55 public: 56 public:
56 virtual void OnVSync(base::TimeTicks timebase, 57 virtual void OnVSync(base::TimeTicks timebase,
57 base::TimeDelta interval) = 0; 58 base::TimeDelta interval) = 0;
58 }; 59 };
59 60
60 CompositorImpl(CompositorClient* client, gfx::NativeWindow root_window); 61 CompositorImpl(CompositorClient* client, gfx::NativeWindow root_window);
61 ~CompositorImpl() override; 62 ~CompositorImpl() override;
62 63
63 static bool IsInitialized(); 64 static bool IsInitialized();
64 65
65 static cc::SurfaceManager* GetSurfaceManager(); 66 static cc::SurfaceManager* GetSurfaceManager();
66 static std::unique_ptr<cc::SurfaceIdAllocator> CreateSurfaceIdAllocator(); 67 static std::unique_ptr<cc::SurfaceIdAllocator> CreateSurfaceIdAllocator();
67 68
69 static scoped_refptr<cc::VulkanInProcessContextProvider>
70 SharedVulkanContextProviderAndroid();
71
68 void PopulateGpuCapabilities(gpu::Capabilities gpu_capabilities); 72 void PopulateGpuCapabilities(gpu::Capabilities gpu_capabilities);
69 73
70 void AddObserver(VSyncObserver* observer); 74 void AddObserver(VSyncObserver* observer);
71 void RemoveObserver(VSyncObserver* observer); 75 void RemoveObserver(VSyncObserver* observer);
72 void OnNeedsBeginFramesChange(bool needs_begin_frames); 76 void OnNeedsBeginFramesChange(bool needs_begin_frames);
73 77
74 // ui::ResourceProvider implementation. 78 // ui::ResourceProvider implementation.
75 cc::UIResourceId CreateUIResource(cc::UIResourceClient* client) override; 79 cc::UIResourceId CreateUIResource(cc::UIResourceClient* client) override;
76 void DeleteUIResource(cc::UIResourceId resource_id) override; 80 void DeleteUIResource(cc::UIResourceId resource_id) override;
77 bool SupportsETC1NonPowerOfTwo() const override; 81 bool SupportsETC1NonPowerOfTwo() const override;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 gpu::Capabilities gpu_capabilities_; 172 gpu::Capabilities gpu_capabilities_;
169 bool needs_begin_frames_; 173 bool needs_begin_frames_;
170 base::WeakPtrFactory<CompositorImpl> weak_factory_; 174 base::WeakPtrFactory<CompositorImpl> weak_factory_;
171 175
172 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); 176 DISALLOW_COPY_AND_ASSIGN(CompositorImpl);
173 }; 177 };
174 178
175 } // namespace content 179 } // namespace content
176 180
177 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ 181 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698