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

Side by Side Diff: ui/views/mus/surface_context_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
« no previous file with comments | « ui/views/cocoa/bridged_native_widget.mm ('k') | ui/views/mus/surface_context_factory.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 UI_VIEWS_MUS_SURFACE_CONTEXT_FACTORY_H_ 5 #ifndef UI_VIEWS_MUS_SURFACE_CONTEXT_FACTORY_H_
6 #define UI_VIEWS_MUS_SURFACE_CONTEXT_FACTORY_H_ 6 #define UI_VIEWS_MUS_SURFACE_CONTEXT_FACTORY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 11 matching lines...) Expand all
22 22
23 class VIEWS_MUS_EXPORT SurfaceContextFactory : public ui::ContextFactory { 23 class VIEWS_MUS_EXPORT SurfaceContextFactory : public ui::ContextFactory {
24 public: 24 public:
25 explicit SurfaceContextFactory(ui::Gpu* gpu); 25 explicit SurfaceContextFactory(ui::Gpu* gpu);
26 ~SurfaceContextFactory() override; 26 ~SurfaceContextFactory() override;
27 27
28 private: 28 private:
29 // ContextFactory: 29 // ContextFactory:
30 void CreateCompositorFrameSink( 30 void CreateCompositorFrameSink(
31 base::WeakPtr<ui::Compositor> compositor) override; 31 base::WeakPtr<ui::Compositor> compositor) override;
32 std::unique_ptr<ui::Reflector> CreateReflector(
33 ui::Compositor* mirrored_compositor,
34 ui::Layer* mirroring_layer) override;
35 void RemoveReflector(ui::Reflector* reflector) override;
36 scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() override; 32 scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() override;
37 void RemoveCompositor(ui::Compositor* compositor) override; 33 void RemoveCompositor(ui::Compositor* compositor) override;
38 bool DoesCreateTestContexts() override; 34 bool DoesCreateTestContexts() override;
39 uint32_t GetImageTextureTarget(gfx::BufferFormat format, 35 uint32_t GetImageTextureTarget(gfx::BufferFormat format,
40 gfx::BufferUsage usage) override; 36 gfx::BufferUsage usage) override;
41 gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override; 37 gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override;
42 cc::TaskGraphRunner* GetTaskGraphRunner() override; 38 cc::TaskGraphRunner* GetTaskGraphRunner() override;
43 cc::FrameSinkId AllocateFrameSinkId() override;
44 cc::SurfaceManager* GetSurfaceManager() override;
45 void SetDisplayVisible(ui::Compositor* compositor, bool visible) override;
46 void ResizeDisplay(ui::Compositor* compositor,
47 const gfx::Size& size) override;
48 void SetDisplayColorSpace(ui::Compositor* compositor,
49 const gfx::ColorSpace& color_space) override {}
50 void SetAuthoritativeVSyncInterval(ui::Compositor* compositor,
51 base::TimeDelta interval) override {}
52 void SetDisplayVSyncParameters(ui::Compositor* compositor,
53 base::TimeTicks timebase,
54 base::TimeDelta interval) override {}
55 void SetOutputIsSecure(ui::Compositor* compositor, bool secure) override {}
56 void AddObserver(ui::ContextFactoryObserver* observer) override {} 39 void AddObserver(ui::ContextFactoryObserver* observer) override {}
57 void RemoveObserver(ui::ContextFactoryObserver* observer) override {} 40 void RemoveObserver(ui::ContextFactoryObserver* observer) override {}
58 41
59 cc::SurfaceManager surface_manager_;
60 uint32_t next_sink_id_;
61 ui::RasterThreadHelper raster_thread_helper_; 42 ui::RasterThreadHelper raster_thread_helper_;
62 ui::Gpu* gpu_; 43 ui::Gpu* gpu_;
63 44
64 DISALLOW_COPY_AND_ASSIGN(SurfaceContextFactory); 45 DISALLOW_COPY_AND_ASSIGN(SurfaceContextFactory);
65 }; 46 };
66 47
67 } // namespace views 48 } // namespace views
68 49
69 #endif // UI_VIEWS_MUS_SURFACE_CONTEXT_FACTORY_H_ 50 #endif // UI_VIEWS_MUS_SURFACE_CONTEXT_FACTORY_H_
OLDNEW
« no previous file with comments | « ui/views/cocoa/bridged_native_widget.mm ('k') | ui/views/mus/surface_context_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698