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 997886291df8ce2226855871d58e5633dc740e03..65768a48d7c6d20bdce329adc250f24704b4cdb7 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc |
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc |
@@ -334,8 +334,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()) { |
@@ -343,9 +344,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. |
+ window_->layer()->SchedulePaint(gfx::Rect( |
+ params.x, |
+ container->GetSize().height() - params.y - params.height, |
apatrick_chromium
2011/12/06 01:10:30
It looks like a lot of this function is reaching i
jonathan.backer
2011/12/06 01:25:12
I'm asking for the layer for a paint in it's co-or
|
+ 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( |