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

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

Issue 11108004: Android Browser Compositor: Add ScheduleComposite() callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: content/browser/renderer_host/render_widget_host_view_android.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index b1ae8ef53a9028689affcc6c5aad51b374e4334a..09850937427523adf5ab19f8309e797d73f8bb6f 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -17,6 +17,8 @@
#include "content/common/android/device_info.h"
#include "content/common/gpu/gpu_messages.h"
#include "content/common/view_messages.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/Platform.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/WebCompositorSupport.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
namespace content {
@@ -313,11 +315,15 @@ void RenderWidgetHostViewAndroid::AcceleratedSurfaceBuffersSwapped(
if (((gfx::Size)texture_layer_->layer()->bounds()).IsEmpty())
texture_layer_->layer()->setBounds(
DrawDelegateImpl::GetInstance()->GetBounds());
- DrawDelegateImpl::GetInstance()->OnSurfaceUpdated(
- params.surface_handle,
- this,
- base::Bind(&RenderWidgetHostImpl::AcknowledgeBufferPresent,
- params.route_id, gpu_host_id));
+
+ // TODO(sievers): When running the impl thread in the browser we
+ // need to delay the ACK until after commit.
+ DCHECK(!WebKit::Platform::current()->compositorSupport()->
+ isThreadingEnabled());
+ uint32 sync_point =
+ ImageTransportFactoryAndroid::GetInstance()->InsertSyncPoint();
+ RenderWidgetHostImpl::AcknowledgeBufferPresent(
+ params.route_id, gpu_host_id, sync_point);
}
void RenderWidgetHostViewAndroid::AcceleratedSurfacePostSubBuffer(
« no previous file with comments | « content/browser/renderer_host/compositor_impl_android.cc ('k') | content/public/browser/android/compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698