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

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

Issue 2540413003: Mus: DirectOutputSurface* => DisplayOutputSurface* (Closed)
Patch Set: 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 | « services/ui/surfaces/BUILD.gn ('k') | services/ui/surfaces/direct_output_surface.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_H_
6 #define SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_H_
7
8 #include <memory>
9
10 #include "cc/output/in_process_context_provider.h"
11 #include "cc/output/output_surface.h"
12
13 namespace cc {
14 class CompositorFrame;
15 class SyntheticBeginFrameSource;
16 }
17
18 namespace ui {
19
20 // An OutputSurface implementation that directly draws and
21 // swaps to an actual GL surface.
22 class DirectOutputSurface : public cc::OutputSurface {
23 public:
24 DirectOutputSurface(
25 scoped_refptr<cc::InProcessContextProvider> context_provider,
26 cc::SyntheticBeginFrameSource* synthetic_begin_frame_source);
27 ~DirectOutputSurface() override;
28
29 // cc::OutputSurface implementation
30 void BindToClient(cc::OutputSurfaceClient* client) override;
31 void EnsureBackbuffer() override;
32 void DiscardBackbuffer() override;
33 void BindFramebuffer() override;
34 void Reshape(const gfx::Size& size,
35 float device_scale_factor,
36 const gfx::ColorSpace& color_space,
37 bool has_alpha) override;
38 void SwapBuffers(cc::OutputSurfaceFrame frame) override;
39 uint32_t GetFramebufferCopyTextureFormat() override;
40 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override;
41 bool IsDisplayedAsOverlayPlane() const override;
42 unsigned GetOverlayTextureId() const override;
43 bool SurfaceIsSuspendForRecycle() const override;
44 bool HasExternalStencilTest() const override;
45 void ApplyExternalStencil() override;
46
47
48 private:
49 // Called when a swap completion is signaled from ImageTransportSurface.
50 void OnGpuSwapBuffersCompleted(
51 const std::vector<ui::LatencyInfo>& latency_info,
52 gfx::SwapResult result,
53 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac);
54 void OnVSyncParametersUpdated(base::TimeTicks timebase,
55 base::TimeDelta interval);
56
57 cc::OutputSurfaceClient* client_ = nullptr;
58 cc::SyntheticBeginFrameSource* const synthetic_begin_frame_source_;
59
60 base::WeakPtrFactory<DirectOutputSurface> weak_ptr_factory_;
61 };
62
63 } // namespace ui
64
65 #endif // SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « services/ui/surfaces/BUILD.gn ('k') | services/ui/surfaces/direct_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698