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

Unified Diff: cc/output/output_surface.h

Issue 2002303002: Consolidate OutputSurface constructors into GL vs Vulkan. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: outputsurface-constructors: rebase-and-fixcrash 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
« no previous file with comments | « cc/output/gl_renderer_unittest.cc ('k') | cc/output/output_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/output_surface.h
diff --git a/cc/output/output_surface.h b/cc/output/output_surface.h
index 326b2fd2fbf22e8f3ff832b208c4a316c744a583..879f29733ce3740da39d09985dcd335d1757539f 100644
--- a/cc/output/output_surface.h
+++ b/cc/output/output_surface.h
@@ -46,17 +46,14 @@ 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);
- explicit OutputSurface(std::unique_ptr<SoftwareOutputDevice> software_device);
-
- OutputSurface(scoped_refptr<ContextProvider> context_provider,
- std::unique_ptr<SoftwareOutputDevice> software_device);
+ // Constructor for GL-based and/or software compositing.
+ explicit OutputSurface(scoped_refptr<ContextProvider> context_provider,
+ scoped_refptr<ContextProvider> worker_context_provider,
+ std::unique_ptr<SoftwareOutputDevice> software_device);
+
+ // Constructor for Vulkan-based compositing.
+ explicit OutputSurface(
+ scoped_refptr<VulkanContextProvider> vulkan_context_provider);
~OutputSurface() override;
@@ -172,18 +169,18 @@ class CC_EXPORT OutputSurface : public base::trace_event::MemoryDumpProvider {
base::trace_event::ProcessMemoryDump* pmd) override;
protected:
- OutputSurfaceClient* client_;
-
void PostSwapBuffersComplete();
+ OutputSurfaceClient* client_ = nullptr;
+
struct OutputSurface::Capabilities capabilities_;
scoped_refptr<ContextProvider> context_provider_;
scoped_refptr<ContextProvider> worker_context_provider_;
scoped_refptr<VulkanContextProvider> vulkan_context_provider_;
std::unique_ptr<SoftwareOutputDevice> software_device_;
gfx::Size surface_size_;
- float device_scale_factor_;
- bool has_alpha_;
+ float device_scale_factor_ = -1;
+ bool has_alpha_ = true;
base::ThreadChecker client_thread_checker_;
void SetNeedsRedrawRect(const gfx::Rect& damage_rect);
@@ -192,7 +189,7 @@ class CC_EXPORT OutputSurface : public base::trace_event::MemoryDumpProvider {
void DetachFromClientInternal();
private:
- bool external_stencil_test_enabled_;
+ bool external_stencil_test_enabled_ = false;
base::WeakPtrFactory<OutputSurface> weak_ptr_factory_;
« no previous file with comments | « cc/output/gl_renderer_unittest.cc ('k') | cc/output/output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698