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

Side by Side Diff: cc/CCTextureUpdateController.cpp

Issue 10947017: Enable removing uploads to evicted textures from texture upload queues. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate review feedback Created 8 years, 3 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
« no previous file with comments | « cc/CCTextureUpdateController.h ('k') | cc/CCTextureUpdateControllerTest.cpp » ('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 "config.h" 5 #include "config.h"
6 6
7 #include "CCTextureUpdateController.h" 7 #include "CCTextureUpdateController.h"
8 8
9 #include "GraphicsContext3D.h" 9 #include "GraphicsContext3D.h"
10 #include "TextureCopier.h" 10 #include "TextureCopier.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // Post a 0-delay task when no updates were left. When it runs, 103 // Post a 0-delay task when no updates were left. When it runs,
104 // readyToFinalizeTextureUpdates() will be called. 104 // readyToFinalizeTextureUpdates() will be called.
105 if (!updateMoreTexturesIfEnoughTimeRemaining()) 105 if (!updateMoreTexturesIfEnoughTimeRemaining())
106 m_timer->startOneShot(0); 106 m_timer->startOneShot(0);
107 107
108 m_firstUpdateAttempt = false; 108 m_firstUpdateAttempt = false;
109 } else 109 } else
110 updateMoreTexturesNow(); 110 updateMoreTexturesNow();
111 } 111 }
112 112
113 void CCTextureUpdateController::discardUploadsToEvictedResources()
114 {
115 m_queue->clearUploadsToEvictedResources();
116 }
117
113 void CCTextureUpdateController::finalize() 118 void CCTextureUpdateController::finalize()
114 { 119 {
115 updateTextures(m_resourceProvider, m_uploader, m_queue.get()); 120 updateTextures(m_resourceProvider, m_uploader, m_queue.get());
116 } 121 }
117 122
118 void CCTextureUpdateController::onTimerFired() 123 void CCTextureUpdateController::onTimerFired()
119 { 124 {
120 if (!updateMoreTexturesIfEnoughTimeRemaining()) 125 if (!updateMoreTexturesIfEnoughTimeRemaining())
121 m_client->readyToFinalizeTextureUpdates(); 126 m_client->readyToFinalizeTextureUpdates();
122 } 127 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 } 183 }
179 184
180 // Make sure there are no dangling partial uploads without a flush. 185 // Make sure there are no dangling partial uploads without a flush.
181 if (uploadCount % textureUploadFlushPeriod) 186 if (uploadCount % textureUploadFlushPeriod)
182 m_resourceProvider->shallowFlushIfSupported(); 187 m_resourceProvider->shallowFlushIfSupported();
183 188
184 m_uploader->endUploads(); 189 m_uploader->endUploads();
185 } 190 }
186 191
187 } 192 }
OLDNEW
« no previous file with comments | « cc/CCTextureUpdateController.h ('k') | cc/CCTextureUpdateControllerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698