| 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 "base/containers/hash_tables.h" | 5 #include "base/containers/hash_tables.h" |
| 6 #include "cc/animation/scrollbar_animation_controller.h" | 6 #include "cc/animation/scrollbar_animation_controller.h" |
| 7 #include "cc/layers/append_quads_data.h" | 7 #include "cc/layers/append_quads_data.h" |
| 8 #include "cc/layers/painted_scrollbar_layer.h" | 8 #include "cc/layers/painted_scrollbar_layer.h" |
| 9 #include "cc/layers/painted_scrollbar_layer_impl.h" | 9 #include "cc/layers/painted_scrollbar_layer_impl.h" |
| 10 #include "cc/layers/scrollbar_layer_interface.h" | 10 #include "cc/layers/scrollbar_layer_interface.h" |
| (...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 int max_size = 0; | 621 int max_size = 0; |
| 622 context->getIntegerv(GL_MAX_TEXTURE_SIZE, &max_size); | 622 context->getIntegerv(GL_MAX_TEXTURE_SIZE, &max_size); |
| 623 SetScrollbarBounds(gfx::Size(max_size + 100, max_size + 100)); | 623 SetScrollbarBounds(gfx::Size(max_size + 100, max_size + 100)); |
| 624 RunTest(true, true, true); | 624 RunTest(true, true, true); |
| 625 } | 625 } |
| 626 | 626 |
| 627 class FakeLayerTreeHost : public LayerTreeHost { | 627 class FakeLayerTreeHost : public LayerTreeHost { |
| 628 public: | 628 public: |
| 629 FakeLayerTreeHost(FakeLayerTreeHostClient* client, | 629 FakeLayerTreeHost(FakeLayerTreeHostClient* client, |
| 630 const LayerTreeSettings& settings) | 630 const LayerTreeSettings& settings) |
| 631 : LayerTreeHost(client, NULL, settings), | 631 : LayerTreeHost(client, NULL, NULL, settings), |
| 632 next_id_(1), | 632 next_id_(1), |
| 633 total_ui_resource_created_(0), | 633 total_ui_resource_created_(0), |
| 634 total_ui_resource_deleted_(0) { | 634 total_ui_resource_deleted_(0) { |
| 635 InitializeSingleThreaded(client, base::MessageLoopProxy::current()); | 635 InitializeSingleThreaded(client, base::MessageLoopProxy::current()); |
| 636 } | 636 } |
| 637 | 637 |
| 638 virtual UIResourceId CreateUIResource(UIResourceClient* content) override { | 638 virtual UIResourceId CreateUIResource(UIResourceClient* content) override { |
| 639 total_ui_resource_created_++; | 639 total_ui_resource_created_++; |
| 640 UIResourceId nid = next_id_++; | 640 UIResourceId nid = next_id_++; |
| 641 ui_resource_bitmap_map_.insert( | 641 ui_resource_bitmap_map_.insert( |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1093 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); | 1093 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); |
| 1094 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); | 1094 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); |
| 1095 | 1095 |
| 1096 // Horizontal Scrollbars. | 1096 // Horizontal Scrollbars. |
| 1097 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); | 1097 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); |
| 1098 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); | 1098 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); |
| 1099 } | 1099 } |
| 1100 | 1100 |
| 1101 } // namespace | 1101 } // namespace |
| 1102 } // namespace cc | 1102 } // namespace cc |
| OLD | NEW |