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

Side by Side Diff: cc/resources/prioritized_resource_unittest.cc

Issue 16355009: Rewrite scoped_ptr<T>(NULL) to use the default ctor in cc/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix most vexing parse 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/tiled_layer_unittest.cc ('k') | cc/resources/resource_update_controller_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/resources/prioritized_resource.h" 5 #include "cc/resources/prioritized_resource.h"
6 6
7 #include "cc/resources/prioritized_resource_manager.h" 7 #include "cc/resources/prioritized_resource_manager.h"
8 #include "cc/resources/resource.h" 8 #include "cc/resources/resource.h"
9 #include "cc/test/fake_output_surface.h" 9 #include "cc/test/fake_output_surface.h"
10 #include "cc/test/fake_proxy.h" 10 #include "cc/test/fake_proxy.h"
11 #include "cc/test/tiled_layer_test_common.h" 11 #include "cc/test/tiled_layer_test_common.h"
12 #include "cc/trees/single_thread_proxy.h" // For DebugScopedSetImplThread 12 #include "cc/trees/single_thread_proxy.h" // For DebugScopedSetImplThread
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 namespace cc { 15 namespace cc {
16 16
17 class PrioritizedResourceTest : public testing::Test { 17 class PrioritizedResourceTest : public testing::Test {
18 public: 18 public:
19 PrioritizedResourceTest() 19 PrioritizedResourceTest()
20 : proxy_(scoped_ptr<Thread>(NULL)), 20 : proxy_(scoped_ptr<Thread>()),
21 texture_size_(256, 256), 21 texture_size_(256, 256),
22 texture_format_(GL_RGBA), 22 texture_format_(GL_RGBA),
23 output_surface_(CreateFakeOutputSurface()) { 23 output_surface_(CreateFakeOutputSurface()) {
24 DebugScopedSetImplThread impl_thread(&proxy_); 24 DebugScopedSetImplThread impl_thread(&proxy_);
25 resource_provider_ = cc::ResourceProvider::Create(output_surface_.get(), 0); 25 resource_provider_ = cc::ResourceProvider::Create(output_surface_.get(), 0);
26 } 26 }
27 27
28 virtual ~PrioritizedResourceTest() { 28 virtual ~PrioritizedResourceTest() {
29 DebugScopedSetImplThread impl_thread(&proxy_); 29 DebugScopedSetImplThread impl_thread(&proxy_);
30 resource_provider_.reset(); 30 resource_provider_.reset();
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 resource_manager->MemoryVisibleAndNearbyBytes()); 793 resource_manager->MemoryVisibleAndNearbyBytes());
794 } 794 }
795 795
796 DebugScopedSetImplThreadAndMainThreadBlocked 796 DebugScopedSetImplThreadAndMainThreadBlocked
797 impl_thread_and_main_thread_blocked(&proxy_); 797 impl_thread_and_main_thread_blocked(&proxy_);
798 resource_manager->ClearAllMemory(ResourceProvider()); 798 resource_manager->ClearAllMemory(ResourceProvider());
799 } 799 }
800 800
801 } // namespace 801 } // namespace
802 } // namespace cc 802 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/tiled_layer_unittest.cc ('k') | cc/resources/resource_update_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698