| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/layer_tree_host.h" | 5 #include "cc/layer_tree_host.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "cc/content_layer.h" | 8 #include "cc/content_layer.h" |
| 9 #include "cc/heads_up_display_layer.h" | 9 #include "cc/heads_up_display_layer.h" |
| 10 #include "cc/io_surface_layer.h" | 10 #include "cc/io_surface_layer.h" |
| (...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 955 // Enable the hud. | 955 // Enable the hud. |
| 956 LayerTreeDebugState debug_state; | 956 LayerTreeDebugState debug_state; |
| 957 debug_state.showPropertyChangedRects = true; | 957 debug_state.showPropertyChangedRects = true; |
| 958 m_layerTreeHost->setDebugState(debug_state); | 958 m_layerTreeHost->setDebugState(debug_state); |
| 959 | 959 |
| 960 bool paint_scrollbar = true; | 960 bool paint_scrollbar = true; |
| 961 bool has_thumb = true; | 961 bool has_thumb = true; |
| 962 scoped_refptr<ScrollbarLayer> scrollbar_ = ScrollbarLayer::Create( | 962 scoped_refptr<ScrollbarLayer> scrollbar_ = ScrollbarLayer::Create( |
| 963 FakeWebScrollbar::Create().PassAs<WebKit::WebScrollbar>(), | 963 FakeWebScrollbar::Create().PassAs<WebKit::WebScrollbar>(), |
| 964 FakeScrollbarThemePainter::Create(paint_scrollbar) | 964 FakeScrollbarThemePainter::Create(paint_scrollbar) |
| 965 .PassAs<ScrollbarThemePainter>(), | 965 .PassAs<ScrollbarThemePainter>(), |
| 966 FakeWebScrollbarThemeGeometry::create(has_thumb) | 966 FakeWebScrollbarThemeGeometry::create(has_thumb) |
| 967 .PassAs<WebKit::WebScrollbarThemeGeometry>(), | 967 .PassAs<WebKit::WebScrollbarThemeGeometry>(), |
| 968 content_->id()); | 968 content_->id()); |
| 969 scrollbar_->setBounds(gfx::Size(10, 10)); | 969 scrollbar_->setBounds(gfx::Size(10, 10)); |
| 970 scrollbar_->setAnchorPoint(gfx::PointF()); | 970 scrollbar_->setAnchorPoint(gfx::PointF()); |
| 971 scrollbar_->setIsDrawable(true); | 971 scrollbar_->setIsDrawable(true); |
| 972 root_->addChild(scrollbar_); | 972 root_->addChild(scrollbar_); |
| 973 | 973 |
| 974 m_layerTreeHost->setRootLayer(root_); | 974 m_layerTreeHost->setRootLayer(root_); |
| 975 LayerTreeHostContextTest::setupTree(); | 975 LayerTreeHostContextTest::setupTree(); |
| 976 } | 976 } |
| 977 | 977 |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1219 | 1219 |
| 1220 private: | 1220 private: |
| 1221 int commits_; | 1221 int commits_; |
| 1222 scoped_refptr<FakeScrollbarLayer> scrollbar_layer_; | 1222 scoped_refptr<FakeScrollbarLayer> scrollbar_layer_; |
| 1223 }; | 1223 }; |
| 1224 | 1224 |
| 1225 SINGLE_AND_MULTI_THREAD_TEST_F(ScrollbarLayerLostContext) | 1225 SINGLE_AND_MULTI_THREAD_TEST_F(ScrollbarLayerLostContext) |
| 1226 | 1226 |
| 1227 } // namespace | 1227 } // namespace |
| 1228 } // namespace cc | 1228 } // namespace cc |
| OLD | NEW |