 Chromium Code Reviews
 Chromium Code Reviews Issue 1001643004:
  Remove android webview rendering cruft  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1001643004:
  Remove android webview rendering cruft  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| OLD | NEW | 
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "android_webview/browser/parent_compositor_draw_constraints.h" | 5 #include "android_webview/browser/parent_compositor_draw_constraints.h" | 
| 6 | 6 | 
| 7 #include "android_webview/browser/child_frame.h" | |
| 8 | |
| 7 namespace android_webview { | 9 namespace android_webview { | 
| 8 | 10 | 
| 9 ParentCompositorDrawConstraints::ParentCompositorDrawConstraints() | 11 ParentCompositorDrawConstraints::ParentCompositorDrawConstraints() | 
| 10 : is_layer(false) { | 12 : is_layer(false) { | 
| 11 } | 13 } | 
| 12 | 14 | 
| 13 ParentCompositorDrawConstraints::ParentCompositorDrawConstraints( | 15 ParentCompositorDrawConstraints::ParentCompositorDrawConstraints( | 
| 14 bool is_layer, | 16 bool is_layer, | 
| 15 const gfx::Transform& transform, | 17 const gfx::Transform& transform, | 
| 16 const gfx::Rect& surface_rect) | 18 const gfx::Rect& surface_rect) | 
| 17 : is_layer(is_layer), transform(transform), surface_rect(surface_rect) { | 19 : is_layer(is_layer), transform(transform), surface_rect(surface_rect) { | 
| 18 } | 20 } | 
| 19 | 21 | 
| 20 bool ParentCompositorDrawConstraints::Equals( | 22 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
 | |
| 21 const ParentCompositorDrawConstraints& other) const { | 23 const ChildFrame& frame) const { | 
| 22 if (is_layer != other.is_layer || transform != other.transform) | 24 if (is_layer != frame.is_layer || | 
| 23 return false; | 25 transform != frame.transform_for_tile_priority) { | 
| 26 return true; | |
| 27 } | |
| 24 | 28 | 
| 25 // Don't care about the surface size when neither is on a layer. | 29 // 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
 | |
| 26 return !is_layer || surface_rect == other.surface_rect; | 30 // is turned on. | 
| 
hush (inactive)
2015/03/18 22:29:27
remove "is turned on"
 | |
| 31 return is_layer && !frame.offscreen_pre_raster && | |
| 32 surface_rect != frame.viewport_for_tile_priority; | |
| 27 } | 33 } | 
| 28 | 34 | 
| 29 } // namespace webview | 35 } // namespace webview | 
| OLD | NEW |