Chromium Code Reviews| Index: cc/software_renderer.cc |
| diff --git a/cc/software_renderer.cc b/cc/software_renderer.cc |
| index 44e758d101b116e1e0b33738f71427e887435d99..e56b1e4c959bc36cc25fef64fabfe3fa339850ce 100644 |
| --- a/cc/software_renderer.cc |
| +++ b/cc/software_renderer.cc |
| @@ -258,8 +258,12 @@ void SoftwareRenderer::drawTextureQuad(const DrawingFrame& frame, const TextureD |
| // FIXME: Add support for non-premultiplied alpha. |
| ResourceProvider::ScopedReadLockSoftware lock(m_resourceProvider, quad->resource_id); |
| const SkBitmap* bitmap = lock.skBitmap(); |
| - gfx::RectF uvRect = gfx::ScaleRect(quad->uv_rect, bitmap->width(), bitmap->height()); |
| - SkRect skUvRect = gfx::RectFToSkRect(uvRect); |
| + gfx::PointF uv_top_left = gfx::ScalePoint(quad->uv_top_left, bitmap->width(), bitmap->height()); |
|
danakj
2013/01/11 02:21:51
you could use BoundingRect here and keep the rest
Jerome
2013/01/11 18:00:01
Done.
|
| + gfx::PointF uv_bottom_right = gfx::ScalePoint(quad->uv_bottom_right, bitmap->width(), bitmap->height()); |
| + SkRect skUvRect = SkRect::MakeXYWH(SkFloatToScalar(uv_top_left.x()), |
| + SkFloatToScalar(uv_top_left.y()), |
| + SkFloatToScalar(uv_bottom_right.x() - uv_top_left.x()), |
| + SkFloatToScalar(uv_bottom_right.y() - uv_top_left.y())); |
| if (quad->flipped) |
| m_skCurrentCanvas->scale(1, -1); |
| m_skCurrentCanvas->drawBitmapRectToRect(*bitmap, &skUvRect, |