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

Unified Diff: android_webview/browser/hardware_renderer.cc

Issue 394113002: Tiling priorities in Android Webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
Index: android_webview/browser/hardware_renderer.cc
diff --git a/android_webview/browser/hardware_renderer.cc b/android_webview/browser/hardware_renderer.cc
index 4ed2859b1399038a5dd060058b0bfcd450158404..12c474cb2c17d7afae9e30534b6a7a2be3d59865 100644
--- a/android_webview/browser/hardware_renderer.cc
+++ b/android_webview/browser/hardware_renderer.cc
@@ -188,10 +188,10 @@ void HardwareRenderer::DrawGL(bool stencil_enabled,
viewport_.SetSize(draw_info->width, draw_info->height);
layer_tree_host_->SetViewportSize(viewport_);
- clip_.SetRect(draw_info->clip_left,
- draw_info->clip_top,
- draw_info->clip_right - draw_info->clip_left,
- draw_info->clip_bottom - draw_info->clip_top);
+ gfx::Rect clip(draw_info->clip_left,
+ draw_info->clip_top,
+ draw_info->clip_right - draw_info->clip_left,
+ draw_info->clip_bottom - draw_info->clip_top);
stencil_enabled_ = stencil_enabled;
gfx::Transform transform(gfx::Transform::kSkipInitialization);
@@ -203,10 +203,20 @@ void HardwareRenderer::DrawGL(bool stencil_enabled,
{
base::AutoReset<bool> frame_resetter(&viewport_clip_valid_for_dcheck_,
true);
- layer_tree_host_->SetNeedsRedrawRect(clip_);
+ layer_tree_host_->SetNeedsRedrawRect(clip);
layer_tree_host_->Composite(gfx::FrameTime::Now());
}
gl_surface_->ResetBackingFrameBufferObject();
+
+ // Need to post the new transform matrix and clip back to child compositor
+ // because there is no onDraw during a Render Thread animation, and child
+ // compositor might not have the tiles rasterized as the animation goes on.
+ if (transform != transform_ || clip != clip_) {
+ transform_ = transform;
+ clip_ = clip;
boliu 2014/07/16 17:25:10 child shouldn't need the clip, clip isn't suitable
hush (inactive) 2014/07/16 20:45:32 okay. I also change the function name to PostExter
+ shared_renderer_state_->PostExternalDrawConstraintsToChildCompositor(
+ clip_, transform_);
+ }
}
scoped_ptr<cc::OutputSurface> HardwareRenderer::CreateOutputSurface(

Powered by Google App Engine
This is Rietveld 408576698