Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Side by Side Diff: cc/layers/scrollbar_layer_unittest.cc

Issue 845393002: cc: Create ProxyBeginFrameSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, nullptr, nullptr, settings), 631 : LayerTreeHost(client, nullptr, nullptr, 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, 635 InitializeSingleThreaded(client,
636 base::MessageLoopProxy::current(), 636 base::MessageLoopProxy::current(),
637 nullptr,
637 nullptr); 638 nullptr);
638 } 639 }
639 640
640 UIResourceId CreateUIResource(UIResourceClient* content) override { 641 UIResourceId CreateUIResource(UIResourceClient* content) override {
641 total_ui_resource_created_++; 642 total_ui_resource_created_++;
642 UIResourceId nid = next_id_++; 643 UIResourceId nid = next_id_++;
643 ui_resource_bitmap_map_.insert( 644 ui_resource_bitmap_map_.insert(
644 std::make_pair(nid, content->GetBitmap(nid, false))); 645 std::make_pair(nid, content->GetBitmap(nid, false)));
645 return nid; 646 return nid;
646 } 647 }
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); 1096 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f);
1096 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); 1097 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f);
1097 1098
1098 // Horizontal Scrollbars. 1099 // Horizontal Scrollbars.
1099 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); 1100 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f);
1100 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); 1101 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f);
1101 } 1102 }
1102 1103
1103 } // namespace 1104 } // namespace
1104 } // namespace cc 1105 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698