| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 GraphicsLayerTest() { | 58 GraphicsLayerTest() { |
| 59 clip_layer_ = WTF::WrapUnique(new FakeGraphicsLayer(&client_)); | 59 clip_layer_ = WTF::WrapUnique(new FakeGraphicsLayer(&client_)); |
| 60 scroll_elasticity_layer_ = WTF::WrapUnique(new FakeGraphicsLayer(&client_)); | 60 scroll_elasticity_layer_ = WTF::WrapUnique(new FakeGraphicsLayer(&client_)); |
| 61 graphics_layer_ = WTF::WrapUnique(new FakeGraphicsLayer(&client_)); | 61 graphics_layer_ = WTF::WrapUnique(new FakeGraphicsLayer(&client_)); |
| 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 ASSERT(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 graphics_layer_->PlatformLayer(), 0); |
| 73 layer_tree_view_->SetViewportSize(WebSize(1, 1)); | 73 layer_tree_view_->SetViewportSize(WebSize(1, 1)); |
| 74 } | 74 } |
| 75 | 75 |
| 76 ~GraphicsLayerTest() override { | 76 ~GraphicsLayerTest() override { |
| 77 graphics_layer_.reset(); | 77 graphics_layer_.reset(); |
| 78 layer_tree_view_.reset(); | 78 layer_tree_view_.reset(); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 return Platform::Current()->CurrentThread()->Scheduler()->TimerTaskRunner(); | 196 return Platform::Current()->CurrentThread()->Scheduler()->TimerTaskRunner(); |
| 197 } | 197 } |
| 198 | 198 |
| 199 DEFINE_INLINE_VIRTUAL_TRACE() { ScrollableArea::Trace(visitor); } | 199 DEFINE_INLINE_VIRTUAL_TRACE() { ScrollableArea::Trace(visitor); } |
| 200 | 200 |
| 201 private: | 201 private: |
| 202 ScrollOffset scroll_offset_; | 202 ScrollOffset scroll_offset_; |
| 203 }; | 203 }; |
| 204 | 204 |
| 205 } // namespace blink | 205 } // namespace blink |
| OLD | NEW |