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

Side by Side Diff: cc/resource_update_controller.cc

Issue 11368043: cc: Avoid using upload term in relation to resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « cc/resource_provider_unittest.cc ('k') | cc/software_renderer_unittest.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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/resource_update_controller.h" 7 #include "cc/resource_update_controller.h"
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "cc/prioritized_texture.h" 10 #include "cc/prioritized_texture.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // texture. 174 // texture.
175 paintGrContext->flush(); 175 paintGrContext->flush();
176 176
177 // Flush the GL context so rendering results from this context are 177 // Flush the GL context so rendering results from this context are
178 // visible in the compositor's context. 178 // visible in the compositor's context.
179 paintContext->flush(); 179 paintContext->flush();
180 } 180 }
181 181
182 if (update.bitmap) { 182 if (update.bitmap) {
183 update.bitmap->lockPixels(); 183 update.bitmap->lockPixels();
184 update.texture->upload( 184 update.texture->setPixels(
185 m_resourceProvider, 185 m_resourceProvider,
186 static_cast<const uint8_t*>(update.bitmap->getPixels()), 186 static_cast<const uint8_t*>(update.bitmap->getPixels()),
187 update.content_rect, 187 update.content_rect,
188 update.source_rect, 188 update.source_rect,
189 update.dest_offset); 189 update.dest_offset);
190 update.bitmap->unlockPixels(); 190 update.bitmap->unlockPixels();
191 } 191 }
192 } 192 }
193 193
194 void ResourceUpdateController::finalize() 194 void ResourceUpdateController::finalize()
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 while (m_queue->fullUploadSize() && uploadCount < uploads) { 295 while (m_queue->fullUploadSize() && uploadCount < uploads) {
296 if (!(uploadCount % textureUploadFlushPeriod) && uploadCount) 296 if (!(uploadCount % textureUploadFlushPeriod) && uploadCount)
297 m_resourceProvider->shallowFlushIfSupported(); 297 m_resourceProvider->shallowFlushIfSupported();
298 updateTexture(m_queue->takeFirstFullUpload()); 298 updateTexture(m_queue->takeFirstFullUpload());
299 uploadCount++; 299 uploadCount++;
300 } 300 }
301 m_resourceProvider->shallowFlushIfSupported(); 301 m_resourceProvider->shallowFlushIfSupported();
302 } 302 }
303 303
304 } // namespace cc 304 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resource_provider_unittest.cc ('k') | cc/software_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698