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

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

Issue 12676029: cc: Fix capitalization style in chromified files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
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"
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 resource_manager->CreateTexture(texture_size_, texture_format_); 616 resource_manager->CreateTexture(texture_size_, texture_format_);
617 617
618 // Set equal priorities, and allocate backings for all textures. 618 // Set equal priorities, and allocate backings for all textures.
619 for (size_t i = 0; i < max_textures; ++i) 619 for (size_t i = 0; i < max_textures; ++i)
620 textures[i]->set_request_priority(100); 620 textures[i]->set_request_priority(100);
621 PrioritizeTexturesAndBackings(resource_manager.get()); 621 PrioritizeTexturesAndBackings(resource_manager.get());
622 for (unsigned i = 0; i < max_textures; ++i) 622 for (unsigned i = 0; i < max_textures; ++i)
623 EXPECT_TRUE(ValidateTexture(textures[i], false)); 623 EXPECT_TRUE(ValidateTexture(textures[i], false));
624 624
625 // Drop the memory limit and prioritize (none will be above the threshold, 625 // Drop the memory limit and prioritize (none will be above the threshold,
626 // but they still have backings because reduceMemory hasn't been called). 626 // but they still have backings because ReduceMemory hasn't been called).
627 resource_manager->SetMaxMemoryLimitBytes( 627 resource_manager->SetMaxMemoryLimitBytes(
628 TexturesMemorySize(max_textures / 2)); 628 TexturesMemorySize(max_textures / 2));
629 PrioritizeTexturesAndBackings(resource_manager.get()); 629 PrioritizeTexturesAndBackings(resource_manager.get());
630 630
631 // Push half of them back over the limit. 631 // Push half of them back over the limit.
632 for (size_t i = 0; i < max_textures; i += 2) 632 for (size_t i = 0; i < max_textures; i += 2)
633 EXPECT_TRUE(textures[i]->RequestLate()); 633 EXPECT_TRUE(textures[i]->RequestLate());
634 634
635 // Push the priorities to the backings array and sort the backings array 635 // Push the priorities to the backings array and sort the backings array
636 ResourceManagerUpdateBackingsPriorities(resource_manager.get()); 636 ResourceManagerUpdateBackingsPriorities(resource_manager.get());
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 resource_manager->MemoryVisibleAndNearbyBytes()); 780 resource_manager->MemoryVisibleAndNearbyBytes());
781 } 781 }
782 782
783 DebugScopedSetImplThreadAndMainThreadBlocked 783 DebugScopedSetImplThreadAndMainThreadBlocked
784 impl_thread_and_main_thread_blocked (& proxy_); 784 impl_thread_and_main_thread_blocked (& proxy_);
785 resource_manager->ClearAllMemory(ResourceProvider()); 785 resource_manager->ClearAllMemory(ResourceProvider());
786 } 786 }
787 787
788 } // namespace 788 } // namespace
789 } // namespace cc 789 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/prioritized_resource_manager.cc ('k') | cc/resources/resource_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698