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

Unified Diff: third_party/WebKit/Source/core/paint/BackgroundImageGeometry.h

Issue 2410513002: Plumb preferred raster scale for background images from Blink to cc layers. (Closed)
Patch Set: none Created 4 years, 2 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
Index: third_party/WebKit/Source/core/paint/BackgroundImageGeometry.h
diff --git a/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.h b/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.h
index 1215ad22cbd1ca195b91a85383b1f34795cfcb08..b2f932cb4d4d9c667234eccf0b904b3b913064a1 100644
--- a/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.h
+++ b/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.h
@@ -30,6 +30,16 @@ class BackgroundImageGeometry {
const FillLayer&,
const LayoutRect& paintRect);
+ // destRect() is the rect in the space of the containing box into which to
+ // draw the image. If the image is repeated via tiling, tileSize() is the size
+ // in pixels of the box to draw the image once.
Stephen Chennney 2016/10/17 14:31:30 "... is the size of each instance of the image, in
chrishtr 2016/10/19 03:51:36 Isn't it in destination space though? So it isn't
Stephen Chennney 2016/10/19 14:48:15 Right, my comment wasn't clear either. I also real
chrishtr 2016/10/19 16:56:07 I added a sentence referencing CSS as an example,
+ //
+ // tileSize() need not be the same as the intrinsic size of the image; if not,
+ // it means the image will be resized (via an image filter) when painted into
+ // that tile region.
Stephen Chennney 2016/10/19 14:48:15 Then this comment stays to make it clear we will r
chrishtr 2016/10/19 16:56:07 Ack.
+ //
+ // spaceSize().width in the horizontal and spaceSize().height in the vertical
+ // direction are the spaces between tiles, if the image is tiled.
Stephen Chennney 2016/10/19 14:48:15 There's already a comment below on spaceSize(). I
chrishtr 2016/10/19 16:56:06 Removed.
const LayoutRect& destRect() const { return m_destRect; }
const LayoutSize& tileSize() const { return m_tileSize; }
const LayoutPoint& phase() const { return m_phase; }
Stephen Chennney 2016/10/19 14:48:15 If we want to comment all of them, this one is "ph
chrishtr 2016/10/19 16:56:06 Done.

Powered by Google App Engine
This is Rietveld 408576698