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

Unified Diff: content/browser/android/in_process/synchronous_compositor_output_surface.cc

Issue 517893002: Cleanup resourceless_software_draw() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 6 years, 4 months 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
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/in_process/synchronous_compositor_output_surface.cc
diff --git a/content/browser/android/in_process/synchronous_compositor_output_surface.cc b/content/browser/android/in_process/synchronous_compositor_output_surface.cc
index 682c530dc3938d61d0557ddb5e439a1998102c00..200e709478443a3eb1d2f7322e9e72e5b3234415 100644
--- a/content/browser/android/in_process/synchronous_compositor_output_surface.cc
+++ b/content/browser/android/in_process/synchronous_compositor_output_surface.cc
@@ -200,9 +200,15 @@ SynchronousCompositorOutputSurface::DemandDrawSw(SkCanvas* canvas) {
surface_size_ = gfx::Size(canvas->getDeviceSize().width(),
canvas->getDeviceSize().height());
- // Resourceless software draw does not need viewport_for_tiling.
- gfx::Rect empty;
- InvokeComposite(transform, clip, clip, empty, gfx::Transform(), false);
+ // Pass in the cached hw viewport and transform for tile priority to avoid
+ // tile thrashing when the WebView is alternating between hardware and
+ // software draws.
+ InvokeComposite(transform,
+ clip,
+ clip,
+ cached_hw_viewport_rect_for_tile_priority_,
+ cached_hw_transform_for_tile_priority_,
+ false);
return frame_holder_.Pass();
}
@@ -239,14 +245,6 @@ void SynchronousCompositorOutputSurface::InvokeComposite(
cached_hw_viewport_rect_for_tile_priority_ =
viewport_rect_for_tile_priority;
cached_hw_transform_for_tile_priority_ = transform_for_tile_priority;
- } else {
- bool resourceless_software_draw = false;
- SetExternalDrawConstraints(cached_hw_transform_,
boliu 2014/08/29 02:01:41 we still want this to restore draw viewports and w
hush (inactive) 2014/08/29 02:20:57 Done.
- cached_hw_viewport_,
- cached_hw_clip_,
- cached_hw_viewport_rect_for_tile_priority_,
- cached_hw_transform_for_tile_priority_,
- resourceless_software_draw);
}
if (frame_holder_.get())
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698