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

Side by Side Diff: cc/software_renderer.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/single_thread_proxy.cc ('k') | cc/solid_color_draw_quad.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 "CCRendererSoftware.h" 7 #include "CCRendererSoftware.h"
8 8
9 #include "CCDebugBorderDrawQuad.h" 9 #include "CCDebugBorderDrawQuad.h"
10 #include "CCSolidColorDrawQuad.h" 10 #include "CCSolidColorDrawQuad.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 FloatRect uvRect = quad->uvRect(); 257 FloatRect uvRect = quad->uvRect();
258 uvRect.scale(quad->quadRect().width(), quad->quadRect().height()); 258 uvRect.scale(quad->quadRect().width(), quad->quadRect().height());
259 SkIRect skUvRect = toSkIRect(enclosingIntRect(uvRect)); 259 SkIRect skUvRect = toSkIRect(enclosingIntRect(uvRect));
260 if (quad->flipped()) 260 if (quad->flipped())
261 m_skCurrentCanvas->scale(1, -1); 261 m_skCurrentCanvas->scale(1, -1);
262 m_skCurrentCanvas->drawBitmapRect(*quadResourceLock.skBitmap(), &skUvRect, t oSkRect(quadVertexRect()), &m_skCurrentPaint); 262 m_skCurrentCanvas->drawBitmapRect(*quadResourceLock.skBitmap(), &skUvRect, t oSkRect(quadVertexRect()), &m_skCurrentPaint);
263 } 263 }
264 264
265 void CCRendererSoftware::drawTileQuad(const DrawingFrame& frame, const CCTileDra wQuad* quad) 265 void CCRendererSoftware::drawTileQuad(const DrawingFrame& frame, const CCTileDra wQuad* quad)
266 { 266 {
267 ASSERT(isSoftwareResource(quad->resourceId())); 267 DCHECK(isSoftwareResource(quad->resourceId()));
268 CCResourceProvider::ScopedReadLockSoftware quadResourceLock(m_resourceProvid er, quad->resourceId()); 268 CCResourceProvider::ScopedReadLockSoftware quadResourceLock(m_resourceProvid er, quad->resourceId());
269 269
270 SkIRect uvRect = toSkIRect(IntRect(quad->textureOffset(), quad->quadRect().s ize())); 270 SkIRect uvRect = toSkIRect(IntRect(quad->textureOffset(), quad->quadRect().s ize()));
271 m_skCurrentCanvas->drawBitmapRect(*quadResourceLock.skBitmap(), &uvRect, toS kRect(quadVertexRect()), &m_skCurrentPaint); 271 m_skCurrentCanvas->drawBitmapRect(*quadResourceLock.skBitmap(), &uvRect, toS kRect(quadVertexRect()), &m_skCurrentPaint);
272 } 272 }
273 273
274 void CCRendererSoftware::drawRenderPassQuad(const DrawingFrame& frame, const CCR enderPassDrawQuad* quad) 274 void CCRendererSoftware::drawRenderPassQuad(const DrawingFrame& frame, const CCR enderPassDrawQuad* quad)
275 { 275 {
276 CachedTexture* contentsTexture = m_renderPassTextures.get(quad->renderPassId ()); 276 CachedTexture* contentsTexture = m_renderPassTextures.get(quad->renderPassId ());
277 if (!contentsTexture || !contentsTexture->id()) 277 if (!contentsTexture || !contentsTexture->id())
278 return; 278 return;
279 279
280 ASSERT(isSoftwareResource(contentsTexture->id())); 280 DCHECK(isSoftwareResource(contentsTexture->id()));
281 CCResourceProvider::ScopedReadLockSoftware contentsTextureLock(m_resourcePro vider, contentsTexture->id()); 281 CCResourceProvider::ScopedReadLockSoftware contentsTextureLock(m_resourcePro vider, contentsTexture->id());
282 282
283 const SkBitmap* bitmap = contentsTextureLock.skBitmap(); 283 const SkBitmap* bitmap = contentsTextureLock.skBitmap();
284 284
285 SkRect sourceRect; 285 SkRect sourceRect;
286 bitmap->getBounds(&sourceRect); 286 bitmap->getBounds(&sourceRect);
287 287
288 SkRect destRect = toSkRect(quadVertexRect()); 288 SkRect destRect = toSkRect(quadVertexRect());
289 289
290 SkMatrix matrix; 290 SkMatrix matrix;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 } 348 }
349 349
350 void CCRendererSoftware::setVisible(bool visible) 350 void CCRendererSoftware::setVisible(bool visible)
351 { 351 {
352 if (m_visible == visible) 352 if (m_visible == visible)
353 return; 353 return;
354 m_visible = visible; 354 m_visible = visible;
355 } 355 }
356 356
357 } 357 }
OLDNEW
« no previous file with comments | « cc/single_thread_proxy.cc ('k') | cc/solid_color_draw_quad.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698