| OLD | NEW | 
|---|
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 "cc/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" | 
| 6 | 6 | 
| 7 #include <stddef.h> | 7 #include <stddef.h> | 
| 8 | 8 | 
| 9 #include <algorithm> | 9 #include <algorithm> | 
| 10 #include <cmath> | 10 #include <cmath> | 
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 299       if (scroll_info.scrolls[i].layer_id != id) | 299       if (scroll_info.scrolls[i].layer_id != id) | 
| 300         continue; | 300         continue; | 
| 301       times_encountered++; | 301       times_encountered++; | 
| 302     } | 302     } | 
| 303 | 303 | 
| 304     ASSERT_EQ(0, times_encountered); | 304     ASSERT_EQ(0, times_encountered); | 
| 305   } | 305   } | 
| 306 | 306 | 
| 307   LayerImpl* CreateScrollAndContentsLayers(LayerTreeImpl* layer_tree_impl, | 307   LayerImpl* CreateScrollAndContentsLayers(LayerTreeImpl* layer_tree_impl, | 
| 308                                            const gfx::Size& content_size) { | 308                                            const gfx::Size& content_size) { | 
|  | 309     // Clear any existing viewport layers that were setup so this function can | 
|  | 310     // be called multiple times. | 
|  | 311     layer_tree_impl->ClearViewportLayers(); | 
|  | 312 | 
| 309     // Create both an inner viewport scroll layer and an outer viewport scroll | 313     // Create both an inner viewport scroll layer and an outer viewport scroll | 
| 310     // layer. The MaxScrollOffset of the outer viewport scroll layer will be | 314     // layer. The MaxScrollOffset of the outer viewport scroll layer will be | 
| 311     // 0x0, so the scrolls will be applied directly to the inner viewport. | 315     // 0x0, so the scrolls will be applied directly to the inner viewport. | 
| 312     const int kOuterViewportClipLayerId = 116; | 316     const int kOuterViewportClipLayerId = 116; | 
| 313     const int kOuterViewportScrollLayerId = 117; | 317     const int kOuterViewportScrollLayerId = 117; | 
| 314     const int kContentLayerId = 118; | 318     const int kContentLayerId = 118; | 
| 315     const int kInnerViewportScrollLayerId = 2; | 319     const int kInnerViewportScrollLayerId = 2; | 
| 316     const int kInnerViewportClipLayerId = 4; | 320     const int kInnerViewportClipLayerId = 4; | 
| 317     const int kPageScaleLayerId = 5; | 321     const int kPageScaleLayerId = 5; | 
| 318 | 322 | 
| (...skipping 12048 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 12367     else | 12371     else | 
| 12368       EXPECT_FALSE(tile->HasRasterTask()); | 12372       EXPECT_FALSE(tile->HasRasterTask()); | 
| 12369   } | 12373   } | 
| 12370   Region expected_invalidation( | 12374   Region expected_invalidation( | 
| 12371       raster_source->GetRectForImage(checkerable_image->uniqueID())); | 12375       raster_source->GetRectForImage(checkerable_image->uniqueID())); | 
| 12372   EXPECT_EQ(expected_invalidation, *(root->GetPendingInvalidation())); | 12376   EXPECT_EQ(expected_invalidation, *(root->GetPendingInvalidation())); | 
| 12373 } | 12377 } | 
| 12374 | 12378 | 
| 12375 }  // namespace | 12379 }  // namespace | 
| 12376 }  // namespace cc | 12380 }  // namespace cc | 
| OLD | NEW | 
|---|