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

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: mailbox 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..8373d7910707de9dea9f549c9af3b6ce9a4e0701 100644
--- a/cc/output/output_surface.h
+++ b/cc/output/output_surface.h
@@ -46,16 +46,13 @@ class OutputSurfaceClient;
// surface (on the compositor thread) and go back to step 1.
class CC_EXPORT OutputSurface : public base::trace_event::MemoryDumpProvider {
public:
+ // Constructor for GL-based and/or software compositing.
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,
+ // Constructor for Vulkan-based and/or software compositing.
piman 2016/05/23 22:23:51 nit: For software compositing, we would use the ab
danakj 2016/05/23 22:28:55 Ya, kinda, until Webview uses vulkan and then we n
+ OutputSurface(scoped_refptr<VulkanContextProvider> vulkan_context_provider,
std::unique_ptr<SoftwareOutputDevice> software_device);
~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_;

Powered by Google App Engine
This is Rietveld 408576698