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

Unified Diff: android_webview/browser/parent_compositor_draw_constraints.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/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
new file mode 100644
index 0000000000000000000000000000000000000000..284c3e0bda103aa8bc023e7fd731045584f68ace
--- /dev/null
+++ b/android_webview/browser/parent_compositor_draw_constraints.cc
@@ -0,0 +1,32 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "android_webview/browser/parent_compositor_draw_constraints.h"
+
+namespace android_webview {
+
+ParentCompositorDrawConstraints::ParentCompositorDrawConstraints()
+ : is_layer(false) {
+}
+
+ParentCompositorDrawConstraints::ParentCompositorDrawConstraints(
+ bool is_layer,
+ const gfx::Transform& transform,
+ const gfx::Rect& surface_rect)
+ : is_layer(is_layer), transform(transform), surface_rect(surface_rect) {
+}
+
+bool ParentCompositorDrawConstraints::Equals(
+ const ParentCompositorDrawConstraints& other) const {
+ if (is_layer != other.is_layer)
+ return false;
+
+ if (!is_layer) // Don't care about the surface size when neither is on a
boliu 2014/07/29 23:50:41 nit: Move comment to above or into the block Also
hush (inactive) 2014/07/30 00:11:33 I moved the comment above the block On 2014/07/29
+ // layer.
+ return transform == other.transform;
+ else
+ return surface_rect == other.surface_rect;
+}
+
+} // namespace webview

Powered by Google App Engine
This is Rietveld 408576698