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

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

Issue 664803003: Update from chromium a8e7c94b1b79a0948d05a1fcfff53391d22ce37a (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « cc/resources/picture_pile_impl.cc ('k') | cc/resources/raster_worker_pool_perftest.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 <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 16 matching lines...) Expand all
27 output_surface_(FakeOutputSurface::Create3d()) { 27 output_surface_(FakeOutputSurface::Create3d()) {
28 DebugScopedSetImplThread impl_thread(&proxy_); 28 DebugScopedSetImplThread impl_thread(&proxy_);
29 CHECK(output_surface_->BindToClient(&output_surface_client_)); 29 CHECK(output_surface_->BindToClient(&output_surface_client_));
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 false);
39 } 38 }
40 39
41 virtual ~PrioritizedResourceTest() { 40 virtual ~PrioritizedResourceTest() {
42 DebugScopedSetImplThread impl_thread(&proxy_); 41 DebugScopedSetImplThread impl_thread(&proxy_);
43 resource_provider_ = nullptr; 42 resource_provider_ = nullptr;
44 } 43 }
45 44
46 size_t TexturesMemorySize(size_t texture_count) { 45 size_t TexturesMemorySize(size_t texture_count) {
47 return Resource::MemorySizeBytes(texture_size_, texture_format_) * 46 return Resource::MemorySizeBytes(texture_size_, texture_format_) *
48 texture_count; 47 texture_count;
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 resource_manager->MemoryVisibleAndNearbyBytes()); 1108 resource_manager->MemoryVisibleAndNearbyBytes());
1110 } 1109 }
1111 1110
1112 DebugScopedSetImplThreadAndMainThreadBlocked 1111 DebugScopedSetImplThreadAndMainThreadBlocked
1113 impl_thread_and_main_thread_blocked(&proxy_); 1112 impl_thread_and_main_thread_blocked(&proxy_);
1114 resource_manager->ClearAllMemory(resource_provider()); 1113 resource_manager->ClearAllMemory(resource_provider());
1115 } 1114 }
1116 1115
1117 } // namespace 1116 } // namespace
1118 } // namespace cc 1117 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_pile_impl.cc ('k') | cc/resources/raster_worker_pool_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698