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

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..41af069996eec0f12b23fdd92c3e4cae2f50fee8 100644
--- a/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.h
+++ b/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.h
@@ -30,8 +30,19 @@ class BackgroundImageGeometry {
const FillLayer&,
const LayoutRect& paintRect);
+ // destRect() is the rect in the space of the containing box into which to
+ // draw the image.
const LayoutRect& destRect() const { return m_destRect; }
+ // If the image is repeated via tiling, tileSize() is the size
+ // in pixels of the area into which to draw the entire image once.
+ //
+ // 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. This may happen because of CSS background-size and
+ // background-repeat requirements.
const LayoutSize& tileSize() const { return m_tileSize; }
+ // phase() represents the point in the image that will appear at (0,0) in the
+ // destination space. The point is defined in tileSize() coordinates.
const LayoutPoint& phase() const { return m_phase; }
// Space-size represents extra width and height that may be added to
// the image if used as a pattern with background-repeat: space.

Powered by Google App Engine
This is Rietveld 408576698