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 2443003004: cc: Make OutputSurface::BindToClient pure virtual and not return bool (Closed)
Patch Set: bindtoclient-pure-virtual: rebase 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"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 46 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
47 uint32_t target, 47 uint32_t target,
48 uint32_t internalformat); 48 uint32_t internalformat);
49 49
50 ~DirectOutputSurfaceOzone() override; 50 ~DirectOutputSurfaceOzone() override;
51 51
52 // TODO(rjkroege): Implement the equivalent of Reflector. 52 // TODO(rjkroege): Implement the equivalent of Reflector.
53 53
54 private: 54 private:
55 // cc::OutputSurface implementation. 55 // cc::OutputSurface implementation.
56 bool BindToClient(cc::OutputSurfaceClient* client) override; 56 void BindToClient(cc::OutputSurfaceClient* client) override;
57 void EnsureBackbuffer() override; 57 void EnsureBackbuffer() override;
58 void DiscardBackbuffer() override; 58 void DiscardBackbuffer() override;
59 void BindFramebuffer() override; 59 void BindFramebuffer() override;
60 void Reshape(const gfx::Size& size, 60 void Reshape(const gfx::Size& size,
61 float device_scale_factor, 61 float device_scale_factor,
62 const gfx::ColorSpace& color_space, 62 const gfx::ColorSpace& color_space,
63 bool has_alpha) override; 63 bool has_alpha) override;
64 void SwapBuffers(cc::OutputSurfaceFrame frame) override; 64 void SwapBuffers(cc::OutputSurfaceFrame frame) override;
65 uint32_t GetFramebufferCopyTextureFormat() override; 65 uint32_t GetFramebufferCopyTextureFormat() override;
66 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override; 66 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override;
67 bool IsDisplayedAsOverlayPlane() const override; 67 bool IsDisplayedAsOverlayPlane() const override;
68 unsigned GetOverlayTextureId() const override; 68 unsigned GetOverlayTextureId() const override;
69 bool SurfaceIsSuspendForRecycle() const override; 69 bool SurfaceIsSuspendForRecycle() const override;
70 bool HasExternalStencilTest() const override; 70 bool HasExternalStencilTest() const override;
71 void ApplyExternalStencil() override; 71 void ApplyExternalStencil() override;
72 72
73 // Taken from BrowserCompositor specific API. 73 // Taken from BrowserCompositor specific API.
74 void OnUpdateVSyncParametersFromGpu(base::TimeTicks timebase, 74 void OnUpdateVSyncParametersFromGpu(base::TimeTicks timebase,
75 base::TimeDelta interval); 75 base::TimeDelta interval);
76 76
77 // Called when a swap completion is sent from the GPU process. 77 // Called when a swap completion is sent from the GPU process.
78 void OnGpuSwapBuffersCompleted(gfx::SwapResult result); 78 void OnGpuSwapBuffersCompleted(gfx::SwapResult result);
79 79
80 cc::OutputSurfaceClient* client_ = nullptr;
81
80 display_compositor::GLHelper gl_helper_; 82 display_compositor::GLHelper gl_helper_;
81 std::unique_ptr<display_compositor::BufferQueue> buffer_queue_; 83 std::unique_ptr<display_compositor::BufferQueue> buffer_queue_;
82 cc::SyntheticBeginFrameSource* const synthetic_begin_frame_source_; 84 cc::SyntheticBeginFrameSource* const synthetic_begin_frame_source_;
83 85
84 gfx::Size reshape_size_; 86 gfx::Size reshape_size_;
85 gfx::Size swap_size_; 87 gfx::Size swap_size_;
86 88
87 base::WeakPtrFactory<DirectOutputSurfaceOzone> weak_ptr_factory_; 89 base::WeakPtrFactory<DirectOutputSurfaceOzone> weak_ptr_factory_;
88 }; 90 };
89 91
90 } // namespace ui 92 } // namespace ui
91 93
92 #endif // SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_ 94 #endif // SERVICES_UI_SURFACES_DIRECT_OUTPUT_SURFACE_OZONE_H_
OLDNEW
« no previous file with comments | « services/ui/surfaces/direct_output_surface.cc ('k') | services/ui/surfaces/direct_output_surface_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698