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

Side by Side Diff: ui/aura/mus/mus_context_factory.h

Issue 2886873002: Only send the FrameSinkId to client when it is necessary (Closed)
Patch Set: WIP Created 3 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
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_AURA_MUS_MUS_CONTEXT_FACTORY_H_ 5 #ifndef UI_AURA_MUS_MUS_CONTEXT_FACTORY_H_
6 #define UI_AURA_MUS_MUS_CONTEXT_FACTORY_H_ 6 #define UI_AURA_MUS_MUS_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 19 matching lines...) Expand all
30 class AURA_EXPORT MusContextFactory : public ui::ContextFactory { 30 class AURA_EXPORT MusContextFactory : public ui::ContextFactory {
31 public: 31 public:
32 explicit MusContextFactory(ui::Gpu* gpu); 32 explicit MusContextFactory(ui::Gpu* gpu);
33 ~MusContextFactory() override; 33 ~MusContextFactory() override;
34 34
35 private: 35 private:
36 // Callback function for Gpu::EstablishGpuChannel(). 36 // Callback function for Gpu::EstablishGpuChannel().
37 void OnEstablishedGpuChannel(base::WeakPtr<ui::Compositor> compositor, 37 void OnEstablishedGpuChannel(base::WeakPtr<ui::Compositor> compositor,
38 scoped_refptr<gpu::GpuChannelHost> gpu_channel); 38 scoped_refptr<gpu::GpuChannelHost> gpu_channel);
39 39
40 void OnCompositorFrameSinkAvailable(
41 base::WeakPtr<ui::Compositor> compositor,
42 std::unique_ptr<cc::CompositorFrameSink> compositor_frame_sink);
43
44 // ContextFactory: 40 // ContextFactory:
45 void CreateCompositorFrameSink( 41 void CreateCompositorFrameSink(
46 base::WeakPtr<ui::Compositor> compositor) override; 42 base::WeakPtr<ui::Compositor> compositor) override;
47 scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() override; 43 scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() override;
48 void RemoveCompositor(ui::Compositor* compositor) override; 44 void RemoveCompositor(ui::Compositor* compositor) override;
49 double GetRefreshRate() const override; 45 double GetRefreshRate() const override;
50 uint32_t GetImageTextureTarget(gfx::BufferFormat format, 46 uint32_t GetImageTextureTarget(gfx::BufferFormat format,
51 gfx::BufferUsage usage) override; 47 gfx::BufferUsage usage) override;
52 gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override; 48 gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override;
53 cc::TaskGraphRunner* GetTaskGraphRunner() override; 49 cc::TaskGraphRunner* GetTaskGraphRunner() override;
54 void AddObserver(ui::ContextFactoryObserver* observer) override {} 50 void AddObserver(ui::ContextFactoryObserver* observer) override {}
55 void RemoveObserver(ui::ContextFactoryObserver* observer) override {} 51 void RemoveObserver(ui::ContextFactoryObserver* observer) override {}
56 52
57 ui::RasterThreadHelper raster_thread_helper_; 53 ui::RasterThreadHelper raster_thread_helper_;
58 ui::Gpu* gpu_; 54 ui::Gpu* gpu_;
59 base::WeakPtrFactory<MusContextFactory> weak_ptr_factory_; 55 base::WeakPtrFactory<MusContextFactory> weak_ptr_factory_;
60 56
61 DISALLOW_COPY_AND_ASSIGN(MusContextFactory); 57 DISALLOW_COPY_AND_ASSIGN(MusContextFactory);
62 }; 58 };
63 59
64 } // namespace aura 60 } // namespace aura
65 61
66 #endif // UI_AURA_MUS_MUS_CONTEXT_FACTORY_H_ 62 #endif // UI_AURA_MUS_MUS_CONTEXT_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698