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

Unified Diff: cc/output/output_surface.h

Issue 1985973002: Defer compositor context creation to the thread. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: contextfactory: . Created 4 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 side-by-side diff with in-line comments
Download patch
Index: cc/output/output_surface.h
diff --git a/cc/output/output_surface.h b/cc/output/output_surface.h
index 326b2fd2fbf22e8f3ff832b208c4a316c744a583..701fbcc21b3b640804a8b5080ae17a94747770f8 100644
--- a/cc/output/output_surface.h
+++ b/cc/output/output_surface.h
@@ -46,17 +46,21 @@ class OutputSurfaceClient;
// surface (on the compositor thread) and go back to step 1.
class CC_EXPORT OutputSurface : public base::trace_event::MemoryDumpProvider {
public:
- OutputSurface(scoped_refptr<ContextProvider> context_provider,
- scoped_refptr<ContextProvider> worker_context_provider,
- scoped_refptr<VulkanContextProvider> vulkan_context_provider,
- std::unique_ptr<SoftwareOutputDevice> software_device);
- OutputSurface(scoped_refptr<ContextProvider> context_provider,
- scoped_refptr<ContextProvider> worker_context_provider);
- explicit OutputSurface(scoped_refptr<ContextProvider> context_provider);
+ OutputSurface(
+ std::unique_ptr<ContextProvider::Factory> compositor_context_factory,
+ scoped_refptr<ContextProvider> worker_context_provider,
+ scoped_refptr<VulkanContextProvider> vulkan_context_provider,
+ std::unique_ptr<SoftwareOutputDevice> software_device);
+ OutputSurface(
+ std::unique_ptr<ContextProvider::Factory> compositor_context_factory,
+ scoped_refptr<ContextProvider> worker_context_provider);
+ explicit OutputSurface(
+ std::unique_ptr<ContextProvider::Factory> compositor_context_factory);
explicit OutputSurface(std::unique_ptr<SoftwareOutputDevice> software_device);
- OutputSurface(scoped_refptr<ContextProvider> context_provider,
- std::unique_ptr<SoftwareOutputDevice> software_device);
+ OutputSurface(
+ std::unique_ptr<ContextProvider::Factory> compositor_context_factory,
+ std::unique_ptr<SoftwareOutputDevice> software_device);
~OutputSurface() override;
@@ -98,7 +102,9 @@ class CC_EXPORT OutputSurface : public base::trace_event::MemoryDumpProvider {
// surface. Either of these may return a null pointer, but not both.
// In the event of a lost context, the entire output surface should be
// recreated.
- ContextProvider* context_provider() const { return context_provider_.get(); }
+ ContextProvider* context_provider() const {
+ return compositor_context_provider_.get();
+ }
ContextProvider* worker_context_provider() const {
return worker_context_provider_.get();
}
@@ -177,7 +183,8 @@ class CC_EXPORT OutputSurface : public base::trace_event::MemoryDumpProvider {
void PostSwapBuffersComplete();
struct OutputSurface::Capabilities capabilities_;
- scoped_refptr<ContextProvider> context_provider_;
+ std::unique_ptr<ContextProvider::Factory> compositor_context_factory_;
+ scoped_refptr<ContextProvider> compositor_context_provider_;
scoped_refptr<ContextProvider> worker_context_provider_;
scoped_refptr<VulkanContextProvider> vulkan_context_provider_;
std::unique_ptr<SoftwareOutputDevice> software_device_;

Powered by Google App Engine
This is Rietveld 408576698