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

Side by Side Diff: cc/output/output_surface.h

Issue 2403373002: cc: Clean up OutputSurfaceClient. (Closed)
Patch Set: osclient: rebase Created 4 years, 2 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 CC_OUTPUT_OUTPUT_SURFACE_H_ 5 #ifndef CC_OUTPUT_OUTPUT_SURFACE_H_
6 #define CC_OUTPUT_OUTPUT_SURFACE_H_ 6 #define CC_OUTPUT_OUTPUT_SURFACE_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 const gfx::ColorSpace& color_space, 111 const gfx::ColorSpace& color_space,
112 bool has_alpha) = 0; 112 bool has_alpha) = 0;
113 113
114 virtual bool HasExternalStencilTest() const = 0; 114 virtual bool HasExternalStencilTest() const = 0;
115 virtual void ApplyExternalStencil() = 0; 115 virtual void ApplyExternalStencil() = 0;
116 116
117 // Gives the GL internal format that should be used for calling CopyTexImage2D 117 // Gives the GL internal format that should be used for calling CopyTexImage2D
118 // when the framebuffer is bound via BindFramebuffer(). 118 // when the framebuffer is bound via BindFramebuffer().
119 virtual uint32_t GetFramebufferCopyTextureFormat() = 0; 119 virtual uint32_t GetFramebufferCopyTextureFormat() = 0;
120 120
121 // The implementation may destroy or steal the contents of the CompositorFrame 121 // Swaps the current backbuffer to the screen. For successful swaps, the
122 // passed in (though it will not take ownership of the CompositorFrame 122 // implementation must call OutputSurfaceClient::DidReceiveSwapBuffersAck()
123 // itself). For successful swaps, the implementation must call 123 // after returning from this method in order to unblock the next frame.
124 // OutputSurfaceClient::DidSwapBuffersComplete() eventually.
125 virtual void SwapBuffers(OutputSurfaceFrame frame) = 0; 124 virtual void SwapBuffers(OutputSurfaceFrame frame) = 0;
126 125
127 protected: 126 protected:
128 // Used internally for the context provider to inform the client about loss, 127 // Used internally for the context provider to inform the client about loss,
129 // and can be overridden to change behaviour instead of informing the client. 128 // and can be overridden to change behaviour instead of informing the client.
130 virtual void DidLoseOutputSurface(); 129 virtual void DidLoseOutputSurface();
131 130
132 OutputSurfaceClient* client_ = nullptr; 131 OutputSurfaceClient* client_ = nullptr;
133 132
134 struct OutputSurface::Capabilities capabilities_; 133 struct OutputSurface::Capabilities capabilities_;
135 scoped_refptr<ContextProvider> context_provider_; 134 scoped_refptr<ContextProvider> context_provider_;
136 scoped_refptr<VulkanContextProvider> vulkan_context_provider_; 135 scoped_refptr<VulkanContextProvider> vulkan_context_provider_;
137 std::unique_ptr<SoftwareOutputDevice> software_device_; 136 std::unique_ptr<SoftwareOutputDevice> software_device_;
138 base::ThreadChecker thread_checker_; 137 base::ThreadChecker thread_checker_;
139 138
140 private: 139 private:
141 DISALLOW_COPY_AND_ASSIGN(OutputSurface); 140 DISALLOW_COPY_AND_ASSIGN(OutputSurface);
142 }; 141 };
143 142
144 } // namespace cc 143 } // namespace cc
145 144
146 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ 145 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « blimp/client/support/compositor/blimp_embedder_compositor.cc ('k') | cc/output/output_surface_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698