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

Unified Diff: content/common/gpu/image_transport_surface.cc

Issue 1477593002: gpu: Initial implementation of CommitOverlayPlanes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add-cop-command
Patch Set: Remove NativeViewGLSurfaceEGL changes Created 5 years, 1 month 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 | « content/common/gpu/image_transport_surface.h ('k') | gpu/command_buffer/client/context_support.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/image_transport_surface.cc
diff --git a/content/common/gpu/image_transport_surface.cc b/content/common/gpu/image_transport_surface.cc
index 6e2bcaed0f69435441c467271a4a58593e2bd3f7..2f13b0371d397aefb30128dcdac5655a5876f216 100644
--- a/content/common/gpu/image_transport_surface.cc
+++ b/content/common/gpu/image_transport_surface.cc
@@ -210,6 +210,21 @@ void PassThroughImageTransportSurface::PostSubBufferAsync(
callback));
}
+gfx::SwapResult PassThroughImageTransportSurface::CommitOverlayPlanes() {
+ scoped_ptr<std::vector<ui::LatencyInfo>> latency_info = StartSwapBuffers();
+ gfx::SwapResult result = gfx::GLSurfaceAdapter::CommitOverlayPlanes();
+ FinishSwapBuffers(latency_info.Pass(), result);
+ return result;
+}
+
+void PassThroughImageTransportSurface::CommitOverlayPlanesAsync(
+ const GLSurface::SwapCompletionCallback& callback) {
+ scoped_ptr<std::vector<ui::LatencyInfo>> latency_info = StartSwapBuffers();
+ gfx::GLSurfaceAdapter::CommitOverlayPlanesAsync(base::Bind(
+ &PassThroughImageTransportSurface::FinishSwapBuffersAsync,
+ weak_ptr_factory_.GetWeakPtr(), base::Passed(&latency_info), callback));
+}
+
bool PassThroughImageTransportSurface::OnMakeCurrent(gfx::GLContext* context) {
if (!did_set_swap_interval_) {
ImageTransportHelper::SetSwapInterval(context);
« no previous file with comments | « content/common/gpu/image_transport_surface.h ('k') | gpu/command_buffer/client/context_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698