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

Side by Side Diff: content/browser/compositor/gpu_process_transport_factory.h

Issue 2563783002: ui + mus: Split ContextFactory into ContextFactory(Client) and ContextFactoryPrivate (Closed)
Patch Set: Restore mash Created 4 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_
6 #define CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 13 matching lines...) Expand all
24 class SingleThreadTaskGraphRunner; 24 class SingleThreadTaskGraphRunner;
25 class SoftwareOutputDevice; 25 class SoftwareOutputDevice;
26 class SurfaceManager; 26 class SurfaceManager;
27 class VulkanInProcessContextProvider; 27 class VulkanInProcessContextProvider;
28 } 28 }
29 29
30 namespace content { 30 namespace content {
31 class ContextProviderCommandBuffer; 31 class ContextProviderCommandBuffer;
32 class OutputDeviceBacking; 32 class OutputDeviceBacking;
33 33
34 class GpuProcessTransportFactory 34 class GpuProcessTransportFactory : public ui::ContextFactory,
35 : public ui::ContextFactory, 35 public ui::ContextFactoryPrivate,
36 public ImageTransportFactory { 36 public ImageTransportFactory {
37 public: 37 public:
38 GpuProcessTransportFactory(); 38 GpuProcessTransportFactory();
39 39
40 ~GpuProcessTransportFactory() override; 40 ~GpuProcessTransportFactory() override;
41 41
42 // ui::ContextFactory implementation. 42 // ui::ContextFactory implementation.
43 void CreateCompositorFrameSink( 43 void CreateCompositorFrameSink(
44 base::WeakPtr<ui::Compositor> compositor) override; 44 base::WeakPtr<ui::Compositor> compositor) override;
45 scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() override;
46 uint32_t GetImageTextureTarget(gfx::BufferFormat format,
47 gfx::BufferUsage usage) override;
48 bool DoesCreateTestContexts() override;
49 gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override;
50 cc::TaskGraphRunner* GetTaskGraphRunner() override;
51 void AddObserver(ui::ContextFactoryObserver* observer) override;
52 void RemoveObserver(ui::ContextFactoryObserver* observer) override;
53
54 // ui::ContextFactoryPrivate implementation.
45 std::unique_ptr<ui::Reflector> CreateReflector(ui::Compositor* source, 55 std::unique_ptr<ui::Reflector> CreateReflector(ui::Compositor* source,
46 ui::Layer* target) override; 56 ui::Layer* target) override;
47 void RemoveReflector(ui::Reflector* reflector) override; 57 void RemoveReflector(ui::Reflector* reflector) override;
48 void RemoveCompositor(ui::Compositor* compositor) override; 58 void RemoveCompositor(ui::Compositor* compositor) override;
49 scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() override;
50 bool DoesCreateTestContexts() override;
51 uint32_t GetImageTextureTarget(gfx::BufferFormat format,
52 gfx::BufferUsage usage) override;
53 gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override;
54 cc::TaskGraphRunner* GetTaskGraphRunner() override;
55 cc::FrameSinkId AllocateFrameSinkId() override; 59 cc::FrameSinkId AllocateFrameSinkId() override;
56 void SetDisplayVisible(ui::Compositor* compositor, bool visible) override; 60 void SetDisplayVisible(ui::Compositor* compositor, bool visible) override;
57 void ResizeDisplay(ui::Compositor* compositor, 61 void ResizeDisplay(ui::Compositor* compositor,
58 const gfx::Size& size) override; 62 const gfx::Size& size) override;
59 void SetDisplayColorSpace(ui::Compositor* compositor, 63 void SetDisplayColorSpace(ui::Compositor* compositor,
60 const gfx::ColorSpace& color_space) override; 64 const gfx::ColorSpace& color_space) override;
61 void SetAuthoritativeVSyncInterval(ui::Compositor* compositor, 65 void SetAuthoritativeVSyncInterval(ui::Compositor* compositor,
62 base::TimeDelta interval) override; 66 base::TimeDelta interval) override;
63 void SetDisplayVSyncParameters(ui::Compositor* compositor, 67 void SetDisplayVSyncParameters(ui::Compositor* compositor,
64 base::TimeTicks timebase, 68 base::TimeTicks timebase,
65 base::TimeDelta interval) override; 69 base::TimeDelta interval) override;
66 void SetOutputIsSecure(ui::Compositor* compositor, bool secure) override; 70 void SetOutputIsSecure(ui::Compositor* compositor, bool secure) override;
67 void AddObserver(ui::ContextFactoryObserver* observer) override;
68 void RemoveObserver(ui::ContextFactoryObserver* observer) override;
69 71
70 // ImageTransportFactory implementation. 72 // ImageTransportFactory implementation.
71 ui::ContextFactory* GetContextFactory() override; 73 ui::ContextFactory* GetContextFactory() override;
74 ui::ContextFactoryPrivate* GetContextFactoryPrivate() override;
72 cc::SurfaceManager* GetSurfaceManager() override; 75 cc::SurfaceManager* GetSurfaceManager() override;
73 display_compositor::GLHelper* GetGLHelper() override; 76 display_compositor::GLHelper* GetGLHelper() override;
74 void SetGpuChannelEstablishFactory( 77 void SetGpuChannelEstablishFactory(
75 gpu::GpuChannelEstablishFactory* factory) override; 78 gpu::GpuChannelEstablishFactory* factory) override;
76 #if defined(OS_MACOSX) 79 #if defined(OS_MACOSX)
77 void SetCompositorSuspendedForRecycle(ui::Compositor* compositor, 80 void SetCompositorSuspendedForRecycle(ui::Compositor* compositor,
78 bool suspended) override; 81 bool suspended) override;
79 #endif 82 #endif
80 83
81 private: 84 private:
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 gpu::GpuChannelEstablishFactory* gpu_channel_factory_ = nullptr; 125 gpu::GpuChannelEstablishFactory* gpu_channel_factory_ = nullptr;
123 126
124 base::WeakPtrFactory<GpuProcessTransportFactory> callback_factory_; 127 base::WeakPtrFactory<GpuProcessTransportFactory> callback_factory_;
125 128
126 DISALLOW_COPY_AND_ASSIGN(GpuProcessTransportFactory); 129 DISALLOW_COPY_AND_ASSIGN(GpuProcessTransportFactory);
127 }; 130 };
128 131
129 } // namespace content 132 } // namespace content
130 133
131 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ 134 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/compositor/gpu_process_transport_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698