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

Unified Diff: android_webview/browser/in_process_view_renderer.h

Issue 17136003: [Android WebView] Fallback tick (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 7 years, 6 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 | « no previous file | android_webview/browser/in_process_view_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/in_process_view_renderer.h
diff --git a/android_webview/browser/in_process_view_renderer.h b/android_webview/browser/in_process_view_renderer.h
index 673b6f3485551de51322f87d750bf18b772f9f74..88cff5a78910b4768443f203278326aff36ece3e 100644
--- a/android_webview/browser/in_process_view_renderer.h
+++ b/android_webview/browser/in_process_view_renderer.h
@@ -7,6 +7,7 @@
#include "android_webview/browser/browser_view_renderer.h"
+#include "base/cancelable_callback.h"
#include "base/memory/weak_ptr.h"
#include "content/public/browser/android/synchronous_compositor_client.h"
#include "ui/gfx/vector2d_f.h"
@@ -68,9 +69,12 @@ class InProcessViewRenderer : public BrowserViewRenderer,
void EnsureContinuousInvalidation(AwDrawGLInfo* draw_info);
bool DrawSWInternal(jobject java_canvas,
const gfx::Rect& clip_bounds);
- bool RenderSW(SkCanvas* canvas);
bool CompositeSW(SkCanvas* canvas);
+ // If we call up view invalidate and OnDraw is not called before a deadline,
+ // then we keep ticking the SynchronousCompositor so it can make progress.
+ void FallbackTickFired();
+
BrowserViewRenderer::Client* client_;
BrowserViewRenderer::JavaHelper* java_helper_;
content::WebContents* web_contents_;
@@ -86,6 +90,8 @@ class InProcessViewRenderer : public BrowserViewRenderer,
// compositor draw which may switch continuous_invalidate on and off in the
// process.
bool block_invalidates_;
+ // Holds a callback to FallbackTickFired while it is pending.
+ base::CancelableClosure fallback_tick_;
int width_;
int height_;
« no previous file with comments | « no previous file | android_webview/browser/in_process_view_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698