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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/gfx/compositor/layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/browser/renderer_host/backing_store_skia.h" 8 #include "content/browser/renderer_host/backing_store_skia.h"
9 #include "content/browser/renderer_host/render_widget_host.h" 9 #include "content/browser/renderer_host/render_widget_host.h"
10 #include "content/browser/renderer_host/web_input_event_aura.h" 10 #include "content/browser/renderer_host/web_input_event_aura.h"
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) 326 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT)
327 window_->layer()->SetExternalTexture( 327 window_->layer()->SetExternalTexture(
328 accelerated_surface_containers_[params.surface_id]->GetTexture()); 328 accelerated_surface_containers_[params.surface_id]->GetTexture());
329 glFlush(); 329 glFlush();
330 330
331 if (!window_->layer()->GetCompositor()) { 331 if (!window_->layer()->GetCompositor()) {
332 // We have no compositor, so we have no way to display the surface 332 // We have no compositor, so we have no way to display the surface
333 // Must still send the ACK 333 // Must still send the ACK
334 RenderWidgetHost::AcknowledgePostSubBuffer(params.route_id, gpu_host_id); 334 RenderWidgetHost::AcknowledgePostSubBuffer(params.route_id, gpu_host_id);
335 } else { 335 } else {
336 // TODO(backer): Plumb the damage rect to the ui compositor so that we 336 #if defined(USE_WEBKIT_COMPOSITOR)
337 // can do a partial swap to display. 337 window_->layer()->SchedulePaint(gfx::Rect(
338 params.x,
339 window_->layer()->bounds().height() - params.y - params.height,
piman 2011/11/30 22:28:44 Shouldn't that depend on whether or not we need to
piman 2011/12/06 00:46:34 Ping?
340 params.width,
341 params.height));
342 #else
338 window_->layer()->ScheduleDraw(); 343 window_->layer()->ScheduleDraw();
344 #endif
339 345
340 // Add sending an ACK to the list of things to do OnCompositingEnded 346 // Add sending an ACK to the list of things to do OnCompositingEnded
341 on_compositing_ended_callbacks_.push_back( 347 on_compositing_ended_callbacks_.push_back(
342 base::Bind(&RenderWidgetHost::AcknowledgePostSubBuffer, 348 base::Bind(&RenderWidgetHost::AcknowledgePostSubBuffer,
343 params.route_id, gpu_host_id)); 349 params.route_id, gpu_host_id));
344 ui::Compositor* compositor = window_->layer()->GetCompositor(); 350 ui::Compositor* compositor = window_->layer()->GetCompositor();
345 if (!compositor->HasObserver(this)) 351 if (!compositor->HasObserver(this))
346 compositor->AddObserver(this); 352 compositor->AddObserver(this);
347 } 353 }
348 #else 354 #else
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 // static 599 // static
594 void RenderWidgetHostView::GetDefaultScreenInfo( 600 void RenderWidgetHostView::GetDefaultScreenInfo(
595 WebKit::WebScreenInfo* results) { 601 WebKit::WebScreenInfo* results) {
596 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); 602 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize();
597 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); 603 results->rect = WebKit::WebRect(0, 0, size.width(), size.height());
598 results->availableRect = results->rect; 604 results->availableRect = results->rect;
599 // TODO(derat): Don't hardcode this? 605 // TODO(derat): Don't hardcode this?
600 results->depth = 24; 606 results->depth = 24;
601 results->depthPerComponent = 8; 607 results->depthPerComponent = 8;
602 } 608 }
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698