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

Unified Diff: android_webview/browser/parent_compositor_draw_constraints.cc

Issue 1001643004: Remove android webview rendering cruft (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years, 9 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/parent_compositor_draw_constraints.cc
diff --git a/android_webview/browser/parent_compositor_draw_constraints.cc b/android_webview/browser/parent_compositor_draw_constraints.cc
index e507d434e640bb05692527f0b4b47c3df9d316b0..e6b60d58a611e8fd6a9462b14f18a331e93df497 100644
--- a/android_webview/browser/parent_compositor_draw_constraints.cc
+++ b/android_webview/browser/parent_compositor_draw_constraints.cc
@@ -4,6 +4,8 @@
#include "android_webview/browser/parent_compositor_draw_constraints.h"
+#include "android_webview/browser/child_frame.h"
+
namespace android_webview {
ParentCompositorDrawConstraints::ParentCompositorDrawConstraints()
@@ -17,13 +19,17 @@ ParentCompositorDrawConstraints::ParentCompositorDrawConstraints(
: is_layer(is_layer), transform(transform), surface_rect(surface_rect) {
}
-bool ParentCompositorDrawConstraints::Equals(
- const ParentCompositorDrawConstraints& other) const {
- if (is_layer != other.is_layer || transform != other.transform)
- return false;
+bool ParentCompositorDrawConstraints::NeedUpdate(
hush (inactive) 2015/03/18 22:29:27 I'm kind of confused by the logic of NeedUpdate. I
boliu 2015/03/18 22:34:07 You are right. To get the same effect, we need to
+ const ChildFrame& frame) const {
+ if (is_layer != frame.is_layer ||
+ transform != frame.transform_for_tile_priority) {
+ return true;
+ }
- // Don't care about the surface size when neither is on a layer.
- return !is_layer || surface_rect == other.surface_rect;
+ // Only care about surface size when we are not a layer and not in pre-raster
hush (inactive) 2015/03/18 22:29:27 I think the comment is "only care about surface si
+ // is turned on.
hush (inactive) 2015/03/18 22:29:27 remove "is turned on"
+ return is_layer && !frame.offscreen_pre_raster &&
+ surface_rect != frame.viewport_for_tile_priority;
}
} // namespace webview
« no previous file with comments | « android_webview/browser/parent_compositor_draw_constraints.h ('k') | android_webview/browser/shared_renderer_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698