Cherry-pick: [Android WebView] Do not throttle if need picture listener

Cherry-pick of Chromium crrev.com/r229116

BUG: 11230312

Original description:

Currently as implemented, this will ensure clearView can be
unset even if AwContents.onPause is called.

Should considering refactoring clearView such that this case
can be dealt with more sanely.

Change-Id: Id5f160d339eace1b58d7fdc3666fc1a9f5248ead
diff --git a/android_webview/browser/in_process_view_renderer.cc b/android_webview/browser/in_process_view_renderer.cc
index 5339e09..cb670c1 100644
--- a/android_webview/browser/in_process_view_renderer.cc
+++ b/android_webview/browser/in_process_view_renderer.cc
@@ -630,6 +630,7 @@
 
 void InProcessViewRenderer::EnableOnNewPicture(bool enabled) {
   on_new_picture_enable_ = enabled;
+  EnsureContinuousInvalidation(NULL, false);
 }
 
 void InProcessViewRenderer::SetIsPaused(bool paused) {
@@ -886,7 +887,8 @@
   // This method should be called again when any of these conditions change.
   bool need_invalidate =
       compositor_needs_continuous_invalidate_ || invalidate_ignore_compositor;
-  bool throttle = is_paused_ || (attached_to_window_ && !window_visible_);
+  bool throttle = (is_paused_ && !on_new_picture_enable_) ||
+                  (attached_to_window_ && !window_visible_);
   if (!need_invalidate || block_invalidates_ || throttle)
     return;