summaryrefslogtreecommitdiffstats
path: root/cc/software_renderer.cc
diff options
context:
space:
mode:
authorenne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-20 04:17:54 +0000
committerenne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-20 04:17:54 +0000
commit2990ff51b4d9c26f815911d92fd7814bb9e80949 (patch)
treec234cb9ab8b9a1f98b79968742c6bf6bfe2b84a1 /cc/software_renderer.cc
parent9c91fc2b8a286096e2914a55305aff5a8ad53c3c (diff)
downloadchromium_src-2990ff51b4d9c26f815911d92fd7814bb9e80949.zip
chromium_src-2990ff51b4d9c26f815911d92fd7814bb9e80949.tar.gz
chromium_src-2990ff51b4d9c26f815911d92fd7814bb9e80949.tar.bz2
cc: Make UV coords in TileDrawQuad a full RectF
Previously, TileDrawQuad assumed that texels were 1:1 with geometry, so it only needed an offset into the texture to calculate the UVs. For impl-side painting where multiple contents scales might be in play, a given texture rect isn't going to be 1:1 with geometry rects and also will not be necessarily integer aligned. Also, some things (like edge antialiasing) still need to know the texture size so that it can do half-texel offsets, so this new texture rect needs to stay in "texel space" rather than 0-1 "uv space". R=danakj@chromium.org BUG=155209 Review URL: https://chromiumcodereview.appspot.com/11348109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168723 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/software_renderer.cc')
-rw-r--r--cc/software_renderer.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/cc/software_renderer.cc b/cc/software_renderer.cc
index 37467aa..e22ecec 100644
--- a/cc/software_renderer.cc
+++ b/cc/software_renderer.cc
@@ -258,9 +258,7 @@ void SoftwareRenderer::drawTileQuad(const DrawingFrame& frame, const TileDrawQua
DCHECK(isSoftwareResource(quad->resourceId()));
ResourceProvider::ScopedReadLockSoftware lock(m_resourceProvider, quad->resourceId());
- SkRect uvRect = SkRect::MakeXYWH(
- quad->textureOffset().x(), quad->textureOffset().y(),
- quad->rect.width(), quad->rect.height());
+ SkRect uvRect = gfx::RectFToSkRect(quad->texCoordRect());
m_skCurrentPaint.setFilterBitmap(true);
m_skCurrentCanvas->drawBitmapRectToRect(*lock.skBitmap(), &uvRect,
gfx::RectFToSkRect(quadVertexRect()),