Cherry-pick: [Android WebView] Only throttle fallback tick

Cherry-pick of Chromium crrev.com/r232909

BUG: 11230312

Original description:

When throttling, either when paused or when in background, only throttle
fallback tick. There are apps relying on the fact that invalidates are
not throttled when paused. When in background, framework should take
care of not calling back with draw for invalidates.

Change-Id: I4e7a4baed8de015d3cb0c18ecaf30b655784923b
diff --git a/android_webview/browser/in_process_view_renderer.cc b/android_webview/browser/in_process_view_renderer.cc
index a96459e..e384584 100644
--- a/android_webview/browser/in_process_view_renderer.cc
+++ b/android_webview/browser/in_process_view_renderer.cc
@@ -893,9 +893,7 @@
   // 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_ && !on_new_picture_enable_) ||
-                  (attached_to_window_ && !window_visible_);
-  if (!need_invalidate || block_invalidates_ || throttle)
+  if (!need_invalidate || block_invalidates_)
     return;
 
   if (draw_info) {
@@ -908,6 +906,11 @@
     client_->PostInvalidate();
   }
 
+  bool throttle_fallback_tick = (is_paused_ && !on_new_picture_enable_) ||
+                                (attached_to_window_ && !window_visible_);
+  if (throttle_fallback_tick)
+    return;
+
   block_invalidates_ = compositor_needs_continuous_invalidate_;
 
   // Unretained here is safe because the callback is cancelled when