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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 11861020: Aura: Browser-side changes for Composite-To-Mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 47d889c0f53067d87f947ac6c457105d18ea6891..85108c053db54eb8daea217da1176964d6d4d462 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -18,6 +18,7 @@
#include "base/string_number_conversions.h"
#include "base/utf_string_conversions.h"
#include "cc/compositor_frame.h"
+#include "cc/compositor_frame_ack.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/browser/gpu/gpu_process_host_ui_shim.h"
#include "content/browser/gpu/gpu_surface_tracker.h"
@@ -1538,6 +1539,16 @@ void RenderWidgetHostImpl::OnSwapCompositorFrame(
frame.metadata.location_bar_content_translation);
}
#endif
+ if (view_) {
+ view_->OnSwapCompositorFrame(frame);
+ } else if (frame.gl_frame_data) {
+ cc::CompositorFrameAck ack;
+ ack.gl_frame_data.reset(new cc::GLFrameData());
+ ack.gl_frame_data->mailbox = frame.gl_frame_data->mailbox;
+ ack.gl_frame_data->size = frame.gl_frame_data->size;
+ ack.gl_frame_data->sync_point = 0;
+ SendSwapCompositorFrameAck(routing_id_, process_->GetID(), ack);
+ }
}
void RenderWidgetHostImpl::OnUpdateRect(
@@ -2337,6 +2348,14 @@ void RenderWidgetHostImpl::AcknowledgeBufferPresent(
}
}
+// static
+void RenderWidgetHostImpl::SendSwapCompositorFrameAck(
+ int32 route_id, int renderer_host_id, const cc::CompositorFrameAck& ack) {
+ RenderProcessHost* host = RenderProcessHost::FromID(renderer_host_id);
+ if (host)
+ host->Send(new ViewMsg_SwapCompositorFrameAck(route_id, ack));
+}
+
void RenderWidgetHostImpl::AcknowledgeSwapBuffersToRenderer() {
if (!is_threaded_compositing_enabled_)
Send(new ViewMsg_SwapBuffers_ACK(routing_id_));
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698