summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-20 15:54:56 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-20 15:54:56 +0000
commita3a81e0ed4b8b50066cc558732827cef17038fe3 (patch)
treeedca4078af1379ad9470009538feb5033fef94f9 /content
parent1b8f15d355bc165e483299a3370ece21439e5651 (diff)
downloadchromium_src-a3a81e0ed4b8b50066cc558732827cef17038fe3.zip
chromium_src-a3a81e0ed4b8b50066cc558732827cef17038fe3.tar.gz
chromium_src-a3a81e0ed4b8b50066cc558732827cef17038fe3.tar.bz2
Turns on RWHVA.
1. Makes sure to schedule a compositor draw when accelerated buffers are swapped on linux, otherwise we don't redraw the content area until the next time a draw is scheduled otherwise 2. Updates the logic in the NativeViewHost/NativeTabContentsContainer/View etc code to better deal with switching tabs. http://crbug.com/99757 TEST=none Review URL: http://codereview.chromium.org/8353021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106504 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/renderer_host/render_widget_host_view_aura.cc14
1 files changed, 11 insertions, 3 deletions
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 e44ded2..299368f 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -154,7 +154,11 @@ void RenderWidgetHostViewAura::ImeCancelComposition() {
void RenderWidgetHostViewAura::DidUpdateBackingStore(
const gfx::Rect& scroll_rect, int scroll_dx, int scroll_dy,
const std::vector<gfx::Rect>& copy_rects) {
- window_->SchedulePaintInRect(scroll_rect);
+ if (!window_->IsVisible())
+ return;
+
+ if (!scroll_rect.IsEmpty())
+ window_->SchedulePaintInRect(scroll_rect);
for (size_t i = 0; i < copy_rects.size(); ++i) {
gfx::Rect rect = copy_rects[i].Subtract(scroll_rect);
@@ -214,6 +218,8 @@ void RenderWidgetHostViewAura::AcceleratedSurfaceBuffersSwapped(
// We have no compositor, so we have no way to display the surface
AcknowledgeSwapBuffers(route_id, gpu_host_id); // Must still send the ACK
} else {
+ window_->layer()->ScheduleDraw();
+
// Add sending an ACK to the list of things to do OnCompositingEnded
on_compositing_ended_callbacks_.push_back(
base::Bind(AcknowledgeSwapBuffers, route_id, gpu_host_id));
@@ -271,11 +277,11 @@ void RenderWidgetHostViewAura::SetScrollOffsetPinning(
#if defined(OS_WIN)
void RenderWidgetHostViewAura::WillWmDestroy() {
- NOTREACHED();
+ // Nothing to do.
}
void RenderWidgetHostViewAura::ShowCompositorHostWindow(bool show) {
- NOTREACHED();
+ // Nothing to do.
}
#endif
@@ -369,6 +375,8 @@ void RenderWidgetHostViewAura::OnCaptureLost() {
}
void RenderWidgetHostViewAura::OnPaint(gfx::Canvas* canvas) {
+ if (!window_->IsVisible())
+ return;
BackingStore* backing_store = host_->GetBackingStore(true);
if (backing_store) {
static_cast<BackingStoreSkia*>(backing_store)->SkiaShowRect(gfx::Point(),