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

Side by Side Diff: services/ui/surfaces/direct_output_surface_ozone.h

Issue 2471503002: Mus+Ash: Unify CompositorFrameSinks (Closed)
Patch Set: Added comment Created 4 years, 1 month 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_ 5 #ifndef SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_
6 #define SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_ 6 #define SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "cc/output/context_provider.h" 11 #include "cc/output/context_provider.h"
12 #include "cc/output/output_surface.h" 12 #include "cc/output/output_surface.h"
13 #include "components/display_compositor/gl_helper.h" 13 #include "components/display_compositor/gl_helper.h"
14 #include "services/ui/surfaces/surfaces_context_provider.h"
14 #include "ui/gfx/geometry/size.h" 15 #include "ui/gfx/geometry/size.h"
15 #include "ui/gfx/native_widget_types.h" 16 #include "ui/gfx/native_widget_types.h"
16 #include "ui/gfx/swap_result.h" 17 #include "ui/gfx/swap_result.h"
17 #include "ui/gl/gl_surface.h" 18 #include "ui/gl/gl_surface.h"
18 19
19 namespace cc { 20 namespace cc {
20 class CompositorFrame; 21 class CompositorFrame;
21 class SyntheticBeginFrameSource; 22 class SyntheticBeginFrameSource;
22 } 23 }
23 24
24 namespace display_compositor { 25 namespace display_compositor {
25 class BufferQueue; 26 class BufferQueue;
26 } 27 }
27 28
28 namespace gpu { 29 namespace gpu {
29 class GpuMemoryBufferManager; 30 class GpuMemoryBufferManager;
30 } 31 }
31 32
32 namespace ui { 33 namespace ui {
33 34
34 class SurfacesContextProvider;
35
36 // An OutputSurface implementation that directly draws and swap to a GL 35 // An OutputSurface implementation that directly draws and swap to a GL
37 // "surfaceless" surface (aka one backed by a buffer managed explicitly in 36 // "surfaceless" surface (aka one backed by a buffer managed explicitly in
38 // mus/ozone. This class is adapted from 37 // mus/ozone. This class is adapted from
39 // GpuSurfacelessBrowserCompositorOutputSurface. 38 // GpuSurfacelessBrowserCompositorOutputSurface.
40 class DirectOutputSurfaceOzone : public cc::OutputSurface { 39 class DirectOutputSurfaceOzone : public cc::OutputSurface {
41 public: 40 public:
42 DirectOutputSurfaceOzone( 41 DirectOutputSurfaceOzone(
43 scoped_refptr<SurfacesContextProvider> context_provider, 42 scoped_refptr<SurfacesContextProvider> context_provider,
44 gfx::AcceleratedWidget widget, 43 gfx::AcceleratedWidget widget,
45 cc::SyntheticBeginFrameSource* synthetic_begin_frame_source, 44 cc::SyntheticBeginFrameSource* synthetic_begin_frame_source,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 84
86 gfx::Size reshape_size_; 85 gfx::Size reshape_size_;
87 gfx::Size swap_size_; 86 gfx::Size swap_size_;
88 87
89 base::WeakPtrFactory<DirectOutputSurfaceOzone> weak_ptr_factory_; 88 base::WeakPtrFactory<DirectOutputSurfaceOzone> weak_ptr_factory_;
90 }; 89 };
91 90
92 } // namespace ui 91 } // namespace ui
93 92
94 #endif // SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_ 93 #endif // SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698