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

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

Issue 17114008: cc: Remove cc::Thread and cc::ThreadImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm-thread: NULLrefptrs Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « cc/layers/layer_unittest.cc ('k') | cc/layers/scrollbar_layer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "cc/layers/nine_patch_layer.h" 5 #include "cc/layers/nine_patch_layer.h"
6 6
7 #include "cc/base/thread.h"
8 #include "cc/debug/overdraw_metrics.h" 7 #include "cc/debug/overdraw_metrics.h"
9 #include "cc/resources/prioritized_resource_manager.h" 8 #include "cc/resources/prioritized_resource_manager.h"
10 #include "cc/resources/resource_provider.h" 9 #include "cc/resources/resource_provider.h"
11 #include "cc/resources/resource_update_queue.h" 10 #include "cc/resources/resource_update_queue.h"
12 #include "cc/scheduler/texture_uploader.h" 11 #include "cc/scheduler/texture_uploader.h"
13 #include "cc/test/fake_layer_tree_host_client.h" 12 #include "cc/test/fake_layer_tree_host_client.h"
14 #include "cc/test/fake_output_surface.h" 13 #include "cc/test/fake_output_surface.h"
15 #include "cc/test/geometry_test_utils.h" 14 #include "cc/test/geometry_test_utils.h"
16 #include "cc/trees/layer_tree_host.h" 15 #include "cc/trees/layer_tree_host.h"
17 #include "cc/trees/occlusion_tracker.h" 16 #include "cc/trees/occlusion_tracker.h"
18 #include "cc/trees/single_thread_proxy.h" 17 #include "cc/trees/single_thread_proxy.h"
19 #include "testing/gmock/include/gmock/gmock.h" 18 #include "testing/gmock/include/gmock/gmock.h"
20 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
21 #include "third_party/skia/include/core/SkBitmap.h" 20 #include "third_party/skia/include/core/SkBitmap.h"
22 21
23 using ::testing::Mock; 22 using ::testing::Mock;
24 using ::testing::_; 23 using ::testing::_;
25 using ::testing::AtLeast; 24 using ::testing::AtLeast;
26 using ::testing::AnyNumber; 25 using ::testing::AnyNumber;
27 26
28 namespace cc { 27 namespace cc {
29 namespace { 28 namespace {
30 29
31 class MockLayerTreeHost : public LayerTreeHost { 30 class MockLayerTreeHost : public LayerTreeHost {
32 public: 31 public:
33 explicit MockLayerTreeHost(LayerTreeHostClient* client) 32 explicit MockLayerTreeHost(LayerTreeHostClient* client)
34 : LayerTreeHost(client, LayerTreeSettings()) { 33 : LayerTreeHost(client, LayerTreeSettings()) {
35 Initialize(scoped_ptr<Thread>()); 34 Initialize(NULL);
36 } 35 }
37 }; 36 };
38 37
39 class NinePatchLayerTest : public testing::Test { 38 class NinePatchLayerTest : public testing::Test {
40 public: 39 public:
41 NinePatchLayerTest() : fake_client_(FakeLayerTreeHostClient::DIRECT_3D) {} 40 NinePatchLayerTest() : fake_client_(FakeLayerTreeHostClient::DIRECT_3D) {}
42 41
43 cc::Proxy* Proxy() const { return layer_tree_host_->proxy(); } 42 cc::Proxy* Proxy() const { return layer_tree_host_->proxy(); }
44 43
45 protected: 44 protected:
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 EXPECT_EQ(1u, queue2.FullUploadSize()); 132 EXPECT_EQ(1u, queue2.FullUploadSize());
134 EXPECT_EQ(0u, queue2.PartialUploadSize()); 133 EXPECT_EQ(0u, queue2.PartialUploadSize());
135 params = queue2.TakeFirstFullUpload(); 134 params = queue2.TakeFirstFullUpload();
136 EXPECT_TRUE(params.texture != NULL); 135 EXPECT_TRUE(params.texture != NULL);
137 EXPECT_EQ(params.texture->resource_manager(), 136 EXPECT_EQ(params.texture->resource_manager(),
138 layer_tree_host_->contents_texture_manager()); 137 layer_tree_host_->contents_texture_manager());
139 } 138 }
140 139
141 } // namespace 140 } // namespace
142 } // namespace cc 141 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_unittest.cc ('k') | cc/layers/scrollbar_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698