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

Side by Side Diff: cc/texture_update_controller.cc

Issue 11192030: cc: Switch to Chromium DCHECKs LOGs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebaseonenne 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 | Annotate | Revision Log
« no previous file with comments | « cc/texture_layer_impl.cc ('k') | cc/thread_proxy.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 "CCTextureUpdateController.h" 7 #include "CCTextureUpdateController.h"
8 8
9 #include "CCResourceProvider.h" 9 #include "CCResourceProvider.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 void CCTextureUpdateController::updateTexture(ResourceUpdate update) 115 void CCTextureUpdateController::updateTexture(ResourceUpdate update)
116 { 116 {
117 if (update.picture) { 117 if (update.picture) {
118 CCPrioritizedTexture* texture = update.texture; 118 CCPrioritizedTexture* texture = update.texture;
119 IntRect pictureRect = update.content_rect; 119 IntRect pictureRect = update.content_rect;
120 IntRect sourceRect = update.source_rect; 120 IntRect sourceRect = update.source_rect;
121 IntSize destOffset = update.dest_offset; 121 IntSize destOffset = update.dest_offset;
122 122
123 texture->acquireBackingTexture(m_resourceProvider); 123 texture->acquireBackingTexture(m_resourceProvider);
124 ASSERT(texture->haveBackingTexture()); 124 DCHECK(texture->haveBackingTexture());
125 125
126 ASSERT(m_resourceProvider->resourceType(texture->resourceId()) == 126 DCHECK(m_resourceProvider->resourceType(texture->resourceId()) ==
127 CCResourceProvider::GLTexture); 127 CCResourceProvider::GLTexture);
128 128
129 WebGraphicsContext3D* paintContext = CCProxy::hasImplThread() ? 129 WebGraphicsContext3D* paintContext = CCProxy::hasImplThread() ?
130 WebSharedGraphicsContext3D::compositorThreadContext() : 130 WebSharedGraphicsContext3D::compositorThreadContext() :
131 WebSharedGraphicsContext3D::mainThreadContext(); 131 WebSharedGraphicsContext3D::mainThreadContext();
132 GrContext* paintGrContext = CCProxy::hasImplThread() ? 132 GrContext* paintGrContext = CCProxy::hasImplThread() ?
133 WebSharedGraphicsContext3D::compositorThreadGrContext() : 133 WebSharedGraphicsContext3D::compositorThreadGrContext() :
134 WebSharedGraphicsContext3D::mainThreadGrContext(); 134 WebSharedGraphicsContext3D::mainThreadGrContext();
135 135
136 // Flush the context in which the backing texture is created so that it 136 // Flush the context in which the backing texture is created so that it
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 while (m_queue->fullUploadSize() && uploadCount < uploads) { 281 while (m_queue->fullUploadSize() && uploadCount < uploads) {
282 if (!(uploadCount % textureUploadFlushPeriod) && uploadCount) 282 if (!(uploadCount % textureUploadFlushPeriod) && uploadCount)
283 m_resourceProvider->shallowFlushIfSupported(); 283 m_resourceProvider->shallowFlushIfSupported();
284 updateTexture(m_queue->takeFirstFullUpload()); 284 updateTexture(m_queue->takeFirstFullUpload());
285 uploadCount++; 285 uploadCount++;
286 } 286 }
287 m_resourceProvider->shallowFlushIfSupported(); 287 m_resourceProvider->shallowFlushIfSupported();
288 } 288 }
289 289
290 } // namespace cc 290 } // namespace cc
OLDNEW
« no previous file with comments | « cc/texture_layer_impl.cc ('k') | cc/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698