| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 clip_layer_->AddChild(scroll_elasticity_layer_.get()); | 62 clip_layer_->AddChild(scroll_elasticity_layer_.get()); |
| 63 scroll_elasticity_layer_->AddChild(graphics_layer_.get()); | 63 scroll_elasticity_layer_->AddChild(graphics_layer_.get()); |
| 64 graphics_layer_->PlatformLayer()->SetScrollClipLayer( | 64 graphics_layer_->PlatformLayer()->SetScrollClipLayer( |
| 65 clip_layer_->PlatformLayer()); | 65 clip_layer_->PlatformLayer()); |
| 66 platform_layer_ = graphics_layer_->PlatformLayer(); | 66 platform_layer_ = graphics_layer_->PlatformLayer(); |
| 67 layer_tree_view_ = WTF::WrapUnique(new WebLayerTreeViewImplForTesting); | 67 layer_tree_view_ = WTF::WrapUnique(new WebLayerTreeViewImplForTesting); |
| 68 DCHECK(layer_tree_view_); | 68 DCHECK(layer_tree_view_); |
| 69 layer_tree_view_->SetRootLayer(*clip_layer_->PlatformLayer()); | 69 layer_tree_view_->SetRootLayer(*clip_layer_->PlatformLayer()); |
| 70 layer_tree_view_->RegisterViewportLayers( | 70 layer_tree_view_->RegisterViewportLayers( |
| 71 scroll_elasticity_layer_->PlatformLayer(), clip_layer_->PlatformLayer(), | 71 scroll_elasticity_layer_->PlatformLayer(), clip_layer_->PlatformLayer(), |
| 72 graphics_layer_->PlatformLayer(), 0); | 72 clip_layer_->PlatformLayer(), nullptr, graphics_layer_->PlatformLayer(), |
| 73 nullptr); |
| 73 layer_tree_view_->SetViewportSize(WebSize(1, 1)); | 74 layer_tree_view_->SetViewportSize(WebSize(1, 1)); |
| 74 } | 75 } |
| 75 | 76 |
| 76 ~GraphicsLayerTest() override { | 77 ~GraphicsLayerTest() override { |
| 77 graphics_layer_.reset(); | 78 graphics_layer_.reset(); |
| 78 layer_tree_view_.reset(); | 79 layer_tree_view_.reset(); |
| 79 } | 80 } |
| 80 | 81 |
| 81 WebLayerTreeView* LayerTreeView() { return layer_tree_view_.get(); } | 82 WebLayerTreeView* LayerTreeView() { return layer_tree_view_.get(); } |
| 82 | 83 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 return Platform::Current()->CurrentThread()->Scheduler()->TimerTaskRunner(); | 197 return Platform::Current()->CurrentThread()->Scheduler()->TimerTaskRunner(); |
| 197 } | 198 } |
| 198 | 199 |
| 199 DEFINE_INLINE_VIRTUAL_TRACE() { ScrollableArea::Trace(visitor); } | 200 DEFINE_INLINE_VIRTUAL_TRACE() { ScrollableArea::Trace(visitor); } |
| 200 | 201 |
| 201 private: | 202 private: |
| 202 ScrollOffset scroll_offset_; | 203 ScrollOffset scroll_offset_; |
| 203 }; | 204 }; |
| 204 | 205 |
| 205 } // namespace blink | 206 } // namespace blink |
| OLD | NEW |