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

Side by Side Diff: cc/software_renderer.cc

Issue 11361129: Don't invert contentsDeviceTransform twice when rendering render passes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Matrix->Transform 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/gl_renderer.cc ('k') | no next file » | 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/software_renderer.h" 7 #include "cc/software_renderer.h"
8 8
9 #include "cc/debug_border_draw_quad.h" 9 #include "cc/debug_border_draw_quad.h"
10 #include "cc/render_pass_draw_quad.h" 10 #include "cc/render_pass_draw_quad.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 if (!isSoftwareResource(quad->resourceId())) { 251 if (!isSoftwareResource(quad->resourceId())) {
252 drawUnsupportedQuad(frame, quad); 252 drawUnsupportedQuad(frame, quad);
253 return; 253 return;
254 } 254 }
255 255
256 // FIXME: Add support for non-premultiplied alpha. 256 // FIXME: Add support for non-premultiplied alpha.
257 ResourceProvider::ScopedReadLockSoftware lock(m_resourceProvider, quad->reso urceId()); 257 ResourceProvider::ScopedReadLockSoftware lock(m_resourceProvider, quad->reso urceId());
258 const SkBitmap* bitmap = lock.skBitmap(); 258 const SkBitmap* bitmap = lock.skBitmap();
259 gfx::RectF uvRect = gfx::ScaleRect(quad->uvRect(), bitmap->width(), bitmap-> height()); 259 gfx::RectF uvRect = gfx::ScaleRect(quad->uvRect(), bitmap->width(), bitmap-> height());
260 SkRect skUvRect = toSkRect(uvRect); 260 SkRect skUvRect = toSkRect(uvRect);
261
danakj 2012/11/07 01:35:19 nit: extraneous leftover change
262 if (quad->flipped()) 261 if (quad->flipped())
263 m_skCurrentCanvas->scale(1, -1); 262 m_skCurrentCanvas->scale(1, -1);
264 m_skCurrentCanvas->drawBitmapRectToRect(*bitmap, &skUvRect, 263 m_skCurrentCanvas->drawBitmapRectToRect(*bitmap, &skUvRect,
265 toSkRect(quadVertexRect()), 264 toSkRect(quadVertexRect()),
266 &m_skCurrentPaint); 265 &m_skCurrentPaint);
267 } 266 }
268 267
269 void SoftwareRenderer::drawTileQuad(const DrawingFrame& frame, const TileDrawQua d* quad) 268 void SoftwareRenderer::drawTileQuad(const DrawingFrame& frame, const TileDrawQua d* quad)
270 { 269 {
271 DCHECK(isSoftwareResource(quad->resourceId())); 270 DCHECK(isSoftwareResource(quad->resourceId()));
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 } 363 }
365 364
366 void SoftwareRenderer::setVisible(bool visible) 365 void SoftwareRenderer::setVisible(bool visible)
367 { 366 {
368 if (m_visible == visible) 367 if (m_visible == visible)
369 return; 368 return;
370 m_visible = visible; 369 m_visible = visible;
371 } 370 }
372 371
373 } // namespace cc 372 } // namespace cc
OLDNEW
« no previous file with comments | « cc/gl_renderer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698