| OLD | NEW |
| 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 "CCTextureUpdateController.h" | 7 #include "CCTextureUpdateController.h" |
| 8 | 8 |
| 9 #include "CCSchedulerTestCommon.h" | 9 #include "CCSchedulerTestCommon.h" |
| 10 #include "CCSingleThreadProxy.h" // For DebugScopedSetImplThread | 10 #include "CCSingleThreadProxy.h" // For DebugScopedSetImplThread |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 } | 155 } |
| 156 | 156 |
| 157 m_numEndUploads++; | 157 m_numEndUploads++; |
| 158 } | 158 } |
| 159 | 159 |
| 160 protected: | 160 protected: |
| 161 virtual void SetUp() | 161 virtual void SetUp() |
| 162 { | 162 { |
| 163 m_context = FakeWebCompositorOutputSurface::create(adoptPtr(new WebGraph
icsContext3DForUploadTest(this))); | 163 m_context = FakeWebCompositorOutputSurface::create(adoptPtr(new WebGraph
icsContext3DForUploadTest(this))); |
| 164 DebugScopedSetImplThread implThread; | 164 DebugScopedSetImplThread implThread; |
| 165 m_resourceProvider = CCResourceProvider::create(m_context.get(), Unthrot
tledUploader); | 165 m_resourceProvider = CCResourceProvider::create(m_context.get()); |
| 166 } | 166 } |
| 167 | 167 |
| 168 | 168 |
| 169 void appendFullUploadsOfIndexedTextureToUpdateQueue(int count, int textureIn
dex) | 169 void appendFullUploadsOfIndexedTextureToUpdateQueue(int count, int textureIn
dex) |
| 170 { | 170 { |
| 171 m_fullUploadCountExpected += count; | 171 m_fullUploadCountExpected += count; |
| 172 m_totalUploadCountExpected += count; | 172 m_totalUploadCountExpected += count; |
| 173 | 173 |
| 174 const IntRect rect(0, 0, 300, 150); | 174 const IntRect rect(0, 0, 300, 150); |
| 175 const TextureUploader::Parameters upload = { &m_textures[textureIndex],
rect, IntSize() }; | 175 const TextureUploader::Parameters upload = { &m_textures[textureIndex],
rect, IntSize() }; |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 EXPECT_EQ(0u, m_queue->fullUploadSize()); | 553 EXPECT_EQ(0u, m_queue->fullUploadSize()); |
| 554 EXPECT_EQ(1u, m_queue->partialUploadSize()); | 554 EXPECT_EQ(1u, m_queue->partialUploadSize()); |
| 555 | 555 |
| 556 m_textures[1].evictBackingResource(); | 556 m_textures[1].evictBackingResource(); |
| 557 m_queue->clearUploadsToEvictedResources(); | 557 m_queue->clearUploadsToEvictedResources(); |
| 558 EXPECT_EQ(0u, m_queue->fullUploadSize()); | 558 EXPECT_EQ(0u, m_queue->fullUploadSize()); |
| 559 EXPECT_EQ(0u, m_queue->partialUploadSize()); | 559 EXPECT_EQ(0u, m_queue->partialUploadSize()); |
| 560 } | 560 } |
| 561 | 561 |
| 562 } // namespace | 562 } // namespace |
| OLD | NEW |