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

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: Address reviewer comments. 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 c0ab2fd7c5bbb08252657c1b34715fee412e4f53..efddf8b545a18fc96794973fe318b596595f6cc8 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,13 @@ 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.
- window_->layer()->ScheduleDraw();
+ // Co-ordinates come in OpenGL co-ordinate space.
+ // We need to convert to layer space.
+ window_->SchedulePaintInRect(gfx::Rect(
+ params.x,
+ container->GetSize().height() - params.y - params.height,
+ params.width,
+ params.height));
// 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