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

Unified Diff: cc/software_renderer.cc

Issue 11783094: cc: Add point-based UV coordinate on TextureLayer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/scrollbar_layer_impl.cc ('k') | cc/test/render_pass_test_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/software_renderer.cc
diff --git a/cc/software_renderer.cc b/cc/software_renderer.cc
index 785ed6b65d006c8bdd939552ddf503eb77a8b11a..11466da7fedc75fc31ec1f7f31c4dbf9f111950f 100644
--- a/cc/software_renderer.cc
+++ b/cc/software_renderer.cc
@@ -259,7 +259,9 @@ 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());
+ gfx::RectF uvRect = gfx::ScaleRect(gfx::BoundingRect(quad->uv_top_left, quad->uv_bottom_right),
+ bitmap->width(),
+ bitmap->height());
SkRect skUvRect = gfx::RectFToSkRect(uvRect);
if (quad->flipped)
m_skCurrentCanvas->scale(1, -1);
« no previous file with comments | « cc/scrollbar_layer_impl.cc ('k') | cc/test/render_pass_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698