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

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

Issue 2404993002: cc: Stop calling DetachFromClient if bind failed. (Closed)
Patch Set: detachinternal: 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
« no previous file with comments | « cc/output/compositor_frame_sink.cc ('k') | cc/surfaces/direct_compositor_frame_sink.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 explicit OutputSurface(scoped_refptr<ContextProvider> context_provider); 61 explicit OutputSurface(scoped_refptr<ContextProvider> context_provider);
62 // Constructor for software compositing. 62 // Constructor for software compositing.
63 explicit OutputSurface(std::unique_ptr<SoftwareOutputDevice> software_device); 63 explicit OutputSurface(std::unique_ptr<SoftwareOutputDevice> software_device);
64 // Constructor for Vulkan-based compositing. 64 // Constructor for Vulkan-based compositing.
65 explicit OutputSurface( 65 explicit OutputSurface(
66 scoped_refptr<VulkanContextProvider> vulkan_context_provider); 66 scoped_refptr<VulkanContextProvider> vulkan_context_provider);
67 67
68 virtual ~OutputSurface(); 68 virtual ~OutputSurface();
69 69
70 // Called by the compositor on the compositor thread. This is a place where 70 // Called by the compositor on the compositor thread. This is a place where
71 // thread-specific data for the output surface can be initialized, since from 71 // thread-specific data for the output surface can be initialized. The
72 // this point to when DetachFromClient() is called the output surface will 72 // OutputSurface will be destroyed on the same thread that BoundToClient is
73 // only be used on the compositor thread. 73 // called on.
74 // The caller should call DetachFromClient() on the same thread before
75 // destroying the OutputSurface, even if this fails. And BindToClient should
76 // not be called twice for a given OutputSurface.
77 virtual bool BindToClient(OutputSurfaceClient* client); 74 virtual bool BindToClient(OutputSurfaceClient* client);
78 75
79 const Capabilities& capabilities() const { return capabilities_; } 76 const Capabilities& capabilities() const { return capabilities_; }
80 77
81 // Obtain the 3d context or the software device associated with this output 78 // Obtain the 3d context or the software device associated with this output
82 // surface. Either of these may return a null pointer, but not both. 79 // surface. Either of these may return a null pointer, but not both.
83 // In the event of a lost context, the entire output surface should be 80 // In the event of a lost context, the entire output surface should be
84 // recreated. 81 // recreated.
85 ContextProvider* context_provider() const { return context_provider_.get(); } 82 ContextProvider* context_provider() const { return context_provider_.get(); }
86 VulkanContextProvider* vulkan_context_provider() const { 83 VulkanContextProvider* vulkan_context_provider() const {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 std::unique_ptr<SoftwareOutputDevice> software_device_; 137 std::unique_ptr<SoftwareOutputDevice> software_device_;
141 base::ThreadChecker thread_checker_; 138 base::ThreadChecker thread_checker_;
142 139
143 private: 140 private:
144 DISALLOW_COPY_AND_ASSIGN(OutputSurface); 141 DISALLOW_COPY_AND_ASSIGN(OutputSurface);
145 }; 142 };
146 143
147 } // namespace cc 144 } // namespace cc
148 145
149 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ 146 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « cc/output/compositor_frame_sink.cc ('k') | cc/surfaces/direct_compositor_frame_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698