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

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

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 "cc/resources/prioritized_resource.h" 5 #include "cc/resources/prioritized_resource.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "cc/resources/prioritized_resource_manager.h" 9 #include "cc/resources/prioritized_resource_manager.h"
10 #include "cc/resources/resource.h" 10 #include "cc/resources/resource.h"
(...skipping 19 matching lines...) Expand all
30 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); 30 shared_bitmap_manager_.reset(new TestSharedBitmapManager());
31 resource_provider_ = ResourceProvider::Create(output_surface_.get(), 31 resource_provider_ = ResourceProvider::Create(output_surface_.get(),
32 shared_bitmap_manager_.get(), 32 shared_bitmap_manager_.get(),
33 NULL, 33 NULL,
34 NULL, 34 NULL,
35 0, 35 0,
36 false, 36 false,
37 1); 37 1);
38 } 38 }
39 39
40 virtual ~PrioritizedResourceTest() { 40 ~PrioritizedResourceTest() override {
41 DebugScopedSetImplThread impl_thread(&proxy_); 41 DebugScopedSetImplThread impl_thread(&proxy_);
42 resource_provider_ = nullptr; 42 resource_provider_ = nullptr;
43 } 43 }
44 44
45 size_t TexturesMemorySize(size_t texture_count) { 45 size_t TexturesMemorySize(size_t texture_count) {
46 return Resource::MemorySizeBytes(texture_size_, texture_format_) * 46 return Resource::MemorySizeBytes(texture_size_, texture_format_) *
47 texture_count; 47 texture_count;
48 } 48 }
49 49
50 scoped_ptr<PrioritizedResourceManager> CreateManager(size_t max_textures) { 50 scoped_ptr<PrioritizedResourceManager> CreateManager(size_t max_textures) {
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 resource_manager->MemoryVisibleAndNearbyBytes()); 1108 resource_manager->MemoryVisibleAndNearbyBytes());
1109 } 1109 }
1110 1110
1111 DebugScopedSetImplThreadAndMainThreadBlocked 1111 DebugScopedSetImplThreadAndMainThreadBlocked
1112 impl_thread_and_main_thread_blocked(&proxy_); 1112 impl_thread_and_main_thread_blocked(&proxy_);
1113 resource_manager->ClearAllMemory(resource_provider()); 1113 resource_manager->ClearAllMemory(resource_provider());
1114 } 1114 }
1115 1115
1116 } // namespace 1116 } // namespace
1117 } // namespace cc 1117 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling_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