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

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

Issue 10915298: Add CCDelegatingRenderer, and corresponding IPCs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix clang Created 8 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 | « content/browser/renderer_host/render_widget_host_view_aura.h ('k') | content/common/gpu/client/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index d7dfadc0936a2d011ff6376aca800e200942189b..b5c696c9b38410fbadf4d50cdf99a2fc51732257 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -947,6 +947,40 @@ void RenderWidgetHostViewAura::AcceleratedSurfaceRelease(
image_transport_clients_.erase(surface_handle);
}
+void RenderWidgetHostViewAura::SwapCompositorFrame(
+ const cc::CompositorFrame& frame) {
+ ui::Compositor* compositor = GetCompositor();
+ if (!compositor) {
+ SwapCompositorFrameAck(frame.resources, NULL);
+ } else {
+ released_front_lock_ = NULL;
+ gfx::Size surface_size = ConvertSizeToDIP(this, frame.size);
+
+ window_->SchedulePaintInRect(gfx::Rect(surface_size));
+ resize_locks_.clear(); // XXX
+ window_->layer()->SetCompositorFrame(frame);
+
+ on_compositing_did_commit_callbacks_.push_back(
+ base::Bind(&RenderWidgetHostViewAura::SendSwapCompositorFrameAck,
+ base::Unretained(this)));
+ if (!compositor->HasObserver(this))
+ compositor->AddObserver(this);
+ }
+}
+
+void RenderWidgetHostViewAura::SendSwapCompositorFrameAck(ui::Compositor*) {
+ cc::TransferableResourceList resources;
+ resources.sync_point = 0;
+ window_->layer()->GetRecycledResources(&resources);
+ SwapCompositorFrameAck(resources, NULL);
+}
+
+void RenderWidgetHostViewAura::SwapCompositorFrameAck(const cc::TransferableResourceList& resources, ui::Compositor*) {
+ cc::CompositorFrameAck ack;
+ ack.resources = resources;
+ host_->SwapCompositorFrameAck(ack);
+}
+
void RenderWidgetHostViewAura::SetSurfaceNotInUseByCompositor(ui::Compositor*) {
if (current_surface_ || !host_->is_hidden())
return;
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.h ('k') | content/common/gpu/client/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698