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

Unified Diff: cc/output/output_surface.cc

Issue 2402173002: cc: Get rid of PostSwapBuffersComplete. (Closed)
Patch Set: postswap: fix-blimp-unittest-post-swap-acks 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/output/output_surface.h ('k') | cc/surfaces/direct_compositor_frame_sink.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/output_surface.cc
diff --git a/cc/output/output_surface.cc b/cc/output/output_surface.cc
index 2740edb65f100e9a7ee3725ec276281c1a56da70..52bb83167dcf0f07b61db6c56b4fa37b4c42a009 100644
--- a/cc/output/output_surface.cc
+++ b/cc/output/output_surface.cc
@@ -20,22 +20,21 @@
namespace cc {
OutputSurface::OutputSurface(scoped_refptr<ContextProvider> context_provider)
- : context_provider_(std::move(context_provider)), weak_ptr_factory_(this) {
+ : context_provider_(std::move(context_provider)) {
DCHECK(context_provider_);
thread_checker_.DetachFromThread();
}
OutputSurface::OutputSurface(
std::unique_ptr<SoftwareOutputDevice> software_device)
- : software_device_(std::move(software_device)), weak_ptr_factory_(this) {
+ : software_device_(std::move(software_device)) {
DCHECK(software_device_);
thread_checker_.DetachFromThread();
}
OutputSurface::OutputSurface(
scoped_refptr<VulkanContextProvider> vulkan_context_provider)
- : vulkan_context_provider_(vulkan_context_provider),
- weak_ptr_factory_(this) {
+ : vulkan_context_provider_(std::move(vulkan_context_provider)) {
DCHECK(vulkan_context_provider_);
thread_checker_.DetachFromThread();
}
@@ -68,18 +67,6 @@ bool OutputSurface::BindToClient(OutputSurfaceClient* client) {
return true;
}
-void OutputSurface::PostSwapBuffersComplete() {
- base::ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE, base::Bind(&OutputSurface::OnSwapBuffersComplete,
- weak_ptr_factory_.GetWeakPtr()));
-}
-
-// We don't post tasks bound to the client directly since they might run
-// after the OutputSurface has been destroyed.
-void OutputSurface::OnSwapBuffersComplete() {
- client_->DidSwapBuffersComplete();
-}
-
void OutputSurface::DidLoseOutputSurface() {
TRACE_EVENT0("cc", "OutputSurface::DidLoseOutputSurface");
client_->DidLoseOutputSurface();
« no previous file with comments | « cc/output/output_surface.h ('k') | cc/surfaces/direct_compositor_frame_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698