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

Unified Diff: android_webview/browser/shared_renderer_state.cc

Issue 394113002: Tiling priorities in Android Webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clean up the APIs in BVR client a little 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/shared_renderer_state.cc
diff --git a/android_webview/browser/shared_renderer_state.cc b/android_webview/browser/shared_renderer_state.cc
index 582908eb39e699abb54e00ef9294bbd8fe0acc98..0e55df5f77256353de47da62742a576502e1b2c7 100644
--- a/android_webview/browser/shared_renderer_state.cc
+++ b/android_webview/browser/shared_renderer_state.cc
@@ -51,6 +51,11 @@ void SharedRendererState::ClientRequestDrawGLOnUIThread() {
}
}
+void SharedRendererState::ClientPostInvalidateIfNeededOnUIThread() {
+ DCHECK(ui_loop_->BelongsToCurrentThread());
+ client_on_ui_->InvalidateOnceIfNeeded();
+}
+
void SharedRendererState::SetDrawGLInput(scoped_ptr<DrawGLInput> input) {
base::AutoLock lock(lock_);
DCHECK(!draw_gl_input_.get());
@@ -62,6 +67,26 @@ scoped_ptr<DrawGLInput> SharedRendererState::PassDrawGLInput() {
return draw_gl_input_.Pass();
}
+void SharedRendererState::PostExternalDrawConstraintsToChildCompositor(
+ const ParentCompositorDrawConstraints& parent_draw_constraints) {
+ {
+ base::AutoLock lock(lock_);
+ parent_draw_constraints_ = parent_draw_constraints;
+ }
+
+ // No need to hold the lock_ during the post task.
+ ui_loop_->PostTask(
+ FROM_HERE,
+ base::Bind(&SharedRendererState::ClientPostInvalidateIfNeededOnUIThread,
+ ui_thread_weak_ptr_));
+}
+
+const ParentCompositorDrawConstraints
+SharedRendererState::ParentDrawConstraints() const {
+ base::AutoLock lock(lock_);
+ return parent_draw_constraints_;
+}
+
void SharedRendererState::SetInsideHardwareRelease(bool inside) {
base::AutoLock lock(lock_);
inside_hardware_release_ = inside;

Powered by Google App Engine
This is Rietveld 408576698