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

Side by Side Diff: cc/CCPrioritizedTextureTest.cpp

Issue 11048044: cc: Switch to Chromium DCHECKs and LOGs (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 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 "config.h" 5 #include "config.h"
6 6
7 #include "CCPrioritizedTexture.h" 7 #include "CCPrioritizedTexture.h"
8 8
9 #include "CCPrioritizedTextureManager.h" 9 #include "CCPrioritizedTextureManager.h"
10 #include "CCSingleThreadProxy.h" // For DebugScopedSetImplThread 10 #include "CCSingleThreadProxy.h" // For DebugScopedSetImplThread
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 textureManager->updateBackingsPriorities(); 73 textureManager->updateBackingsPriorities();
74 } 74 }
75 75
76 CCResourceProvider* resourceProvider() 76 CCResourceProvider* resourceProvider()
77 { 77 {
78 return m_resourceProvider.get(); 78 return m_resourceProvider.get();
79 } 79 }
80 80
81 void textureManagerAssertInvariants(CCPrioritizedTextureManager* textureMana ger) 81 void textureManagerAssertInvariants(CCPrioritizedTextureManager* textureMana ger)
82 { 82 {
83 #if !ASSERT_DISABLED
84 DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThreadBloc ked; 83 DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThreadBloc ked;
85 textureManager->assertInvariants(); 84 textureManager->assertInvariants();
86 #endif
87 } 85 }
88 86
89 bool textureBackingIsAbovePriorityCutoff(CCPrioritizedTexture* texture) 87 bool textureBackingIsAbovePriorityCutoff(CCPrioritizedTexture* texture)
90 { 88 {
91 return texture->m_backing->wasAbovePriorityCutoffAtLastPriorityUpdate(); 89 return texture->m_backing->wasAbovePriorityCutoffAtLastPriorityUpdate();
92 } 90 }
93 91
94 protected: 92 protected:
95 const IntSize m_textureSize; 93 const IntSize m_textureSize;
96 const GC3Denum m_textureFormat; 94 const GC3Denum m_textureFormat;
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 EXPECT_TRUE(textureBackingIsAbovePriorityCutoff(textures[i].get())); 525 EXPECT_TRUE(textureBackingIsAbovePriorityCutoff(textures[i].get()));
528 for (size_t i = 1; i < maxTextures; i += 2) 526 for (size_t i = 1; i < maxTextures; i += 2)
529 EXPECT_FALSE(textureBackingIsAbovePriorityCutoff(textures[i].get())); 527 EXPECT_FALSE(textureBackingIsAbovePriorityCutoff(textures[i].get()));
530 528
531 DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThreadBlocked; 529 DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThreadBlocked;
532 textureManager->clearAllMemory(resourceProvider()); 530 textureManager->clearAllMemory(resourceProvider());
533 } 531 }
534 532
535 533
536 } // namespace 534 } // namespace
OLDNEW
« cc/CCCompletionEvent.h ('K') | « cc/CCPrioritizedTextureManager.cpp ('k') | cc/CCProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698