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

Unified Diff: cc/output/output_surface.cc

Issue 619453002: gpu: Remove Echo and SwapCompletion GL interfacess (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tits
Patch Set: remove comment Created 6 years, 3 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 | « no previous file | cc/test/test_context_support.h » ('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 2b6b7829999ef01c60648b6de7ed9acb4dce1fe7..2c251eb9c44c748320d60c820344c8ca1d39ad8c 100644
--- a/cc/output/output_surface.cc
+++ b/cc/output/output_surface.cc
@@ -177,9 +177,6 @@ void OutputSurface::SetUpContext3d() {
context_provider_->SetLostContextCallback(
base::Bind(&OutputSurface::DidLoseOutputSurface,
base::Unretained(this)));
- context_provider_->ContextSupport()->SetSwapBuffersCompleteCallback(
- base::Bind(&OutputSurface::OnSwapBuffersComplete,
- base::Unretained(this)));
context_provider_->SetMemoryPolicyChangedCallback(
base::Bind(&OutputSurface::SetMemoryPolicy,
base::Unretained(this)));
@@ -207,8 +204,6 @@ void OutputSurface::ResetContext3d() {
ContextProvider::LostContextCallback());
context_provider_->SetMemoryPolicyChangedCallback(
ContextProvider::MemoryPolicyChangedCallback());
- if (gpu::ContextSupport* support = context_provider_->ContextSupport())
- support->SetSwapBuffersCompleteCallback(base::Closure());
}
context_provider_ = NULL;
}
@@ -266,6 +261,12 @@ void OutputSurface::SwapBuffers(CompositorFrame* frame) {
context_provider_->ContextSupport()->PartialSwapBuffers(
frame->gl_frame_data->sub_buffer_rect);
}
+ uint32_t sync_point =
+ context_provider_->ContextGL()->InsertSyncPointCHROMIUM();
+ context_provider_->ContextSupport()->SignalSyncPoint(
+ sync_point,
+ base::Bind(&OutputSurface::OnSwapBuffersComplete,
+ weak_ptr_factory_.GetWeakPtr()));
client_->DidSwapBuffers();
}
« no previous file with comments | « no previous file | cc/test/test_context_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698