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

Unified Diff: cc/output/software_renderer.cc

Issue 2716893002: cc: Reformat renderers to make them work with mask tiling. (Closed)
Patch Set: Add todos for tex_coord_rect computation. Created 3 years, 9 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/output/gl_renderer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/software_renderer.cc
diff --git a/cc/output/software_renderer.cc b/cc/output/software_renderer.cc
index 97137ca0f0ee5663cdf6643fcf3bde51c23542cb..dfd32560876ece22328d301e937676bbfe10da1e 100644
--- a/cc/output/software_renderer.cc
+++ b/cc/output/software_renderer.cc
@@ -460,7 +460,11 @@ void SoftwareRenderer::DrawRenderPassQuad(const RenderPassDrawQuad* quad) {
SkRect dest_visible_rect = gfx::RectFToSkRect(
MathUtil::ScaleRectProportional(QuadVertexRect(), gfx::RectF(quad->rect),
gfx::RectF(quad->visible_rect)));
- SkRect content_rect = SkRect::MakeWH(quad->rect.width(), quad->rect.height());
+ // TODO(sunxd): make this never be empty.
+ SkRect content_rect =
+ quad->tex_coord_rect.IsEmpty()
+ ? SkRect::MakeWH(quad->rect.width(), quad->rect.height())
+ : RectFToSkRect(quad->tex_coord_rect);
const SkBitmap* content = lock.sk_bitmap();
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698