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

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

Issue 8764001: Plumb damage rect to browser compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "" Created 9 years 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_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 160ac613400ba739d511fb5b1f09d94718d20796..bbf9821deab9873733a5ecb6666f301d8a5f91f4 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -364,8 +364,9 @@ void RenderWidgetHostViewAura::AcceleratedSurfacePostSubBuffer(
const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params,
int gpu_host_id) {
#if defined(UI_COMPOSITOR_IMAGE_TRANSPORT)
- window_->layer()->SetExternalTexture(
- accelerated_surface_containers_[params.surface_id]->GetTexture());
+ scoped_refptr<AcceleratedSurfaceContainerLinux> container =
+ accelerated_surface_containers_[params.surface_id];
+ window_->layer()->SetExternalTexture(container->GetTexture());
glFlush();
if (!window_->layer()->GetCompositor()) {
@@ -373,9 +374,16 @@ void RenderWidgetHostViewAura::AcceleratedSurfacePostSubBuffer(
// Must still send the ACK
RenderWidgetHost::AcknowledgePostSubBuffer(params.route_id, gpu_host_id);
} else {
- // TODO(backer): Plumb the damage rect to the ui compositor so that we
- // can do a partial swap to display.
+#if defined(USE_WEBKIT_COMPOSITOR)
+ // Co-ords come in GL co-ord space. Need to convert to layer space.
sky 2011/12/08 17:39:05 I've never seen coordinates abbreviated like that.
jonathan.backer 2011/12/08 18:41:44 Done.
+ window_->layer()->SchedulePaint(gfx::Rect(
sky 2011/12/08 17:39:05 nit: window_->SchedulePaint should work equally we
jonathan.backer 2011/12/08 18:41:44 Done.
+ params.x,
+ container->GetSize().height() - params.y - params.height,
+ params.width,
+ params.height));
+#else
window_->layer()->ScheduleDraw();
+#endif
// Add sending an ACK to the list of things to do OnCompositingEnded
on_compositing_ended_callbacks_.push_back(

Powered by Google App Engine
This is Rietveld 408576698