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/layers/scrollbar_layer.h" | 5 #include "cc/layers/scrollbar_layer.h" |
6 | 6 |
7 #include "base/containers/hash_tables.h" | 7 #include "base/containers/hash_tables.h" |
8 #include "cc/animation/scrollbar_animation_controller.h" | 8 #include "cc/animation/scrollbar_animation_controller.h" |
9 #include "cc/debug/test_web_graphics_context_3d.h" | 9 #include "cc/debug/test_web_graphics_context_3d.h" |
10 #include "cc/layers/append_quads_data.h" | 10 #include "cc/layers/append_quads_data.h" |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 EXPECT_EQ(scrollbar_layer_->content_bounds().width(), | 462 EXPECT_EQ(scrollbar_layer_->content_bounds().width(), |
463 kMaxTextureSize - 1); | 463 kMaxTextureSize - 1); |
464 EXPECT_EQ(scrollbar_layer_->content_bounds().height(), | 464 EXPECT_EQ(scrollbar_layer_->content_bounds().height(), |
465 kMaxTextureSize - 1); | 465 kMaxTextureSize - 1); |
466 | 466 |
467 EndTest(); | 467 EndTest(); |
468 } | 468 } |
469 | 469 |
470 virtual void AfterTest() OVERRIDE {} | 470 virtual void AfterTest() OVERRIDE {} |
471 | 471 |
| 472 virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { |
| 473 settings->max_bytes_pending_upload = 16 * 1024 * 1024; |
| 474 } |
| 475 |
472 private: | 476 private: |
473 scoped_refptr<ScrollbarLayer> scrollbar_layer_; | 477 scoped_refptr<ScrollbarLayer> scrollbar_layer_; |
474 scoped_refptr<Layer> scroll_layer_; | 478 scoped_refptr<Layer> scroll_layer_; |
475 gfx::Size bounds_; | 479 gfx::Size bounds_; |
476 }; | 480 }; |
477 | 481 |
478 TEST_F(ScrollbarLayerTestMaxTextureSize, DirectRenderer) { | 482 TEST_F(ScrollbarLayerTestMaxTextureSize, DirectRenderer) { |
479 scoped_ptr<TestWebGraphicsContext3D> context = | 483 scoped_ptr<TestWebGraphicsContext3D> context = |
480 TestWebGraphicsContext3D::Create(); | 484 TestWebGraphicsContext3D::Create(); |
481 int max_size = 0; | 485 int max_size = 0; |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 layer_tree_settings_.solid_color_scrollbars = false; | 701 layer_tree_settings_.solid_color_scrollbars = false; |
698 // Pick a test scale that moves the scrollbar's (non-zero) position to | 702 // Pick a test scale that moves the scrollbar's (non-zero) position to |
699 // a non-pixel-aligned location. | 703 // a non-pixel-aligned location. |
700 TestResourceUpload(.041f); | 704 TestResourceUpload(.041f); |
701 TestResourceUpload(1.41f); | 705 TestResourceUpload(1.41f); |
702 TestResourceUpload(4.1f); | 706 TestResourceUpload(4.1f); |
703 } | 707 } |
704 | 708 |
705 } // namespace | 709 } // namespace |
706 } // namespace cc | 710 } // namespace cc |
OLD | NEW |