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

Unified Diff: third_party/WebKit/Source/platform/graphics/Image.cpp

Issue 2398453002: Rewrap comments to 80 columns in Source/platform/graphics/. (Closed)
Patch Set: Review feedback 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/platform/graphics/Image.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/Image.cpp b/third_party/WebKit/Source/platform/graphics/Image.cpp
index ca6a6c458af0b51664cfaac9e15e9b04f2bbd9ea..7b8792a4761dc6c8b070f6a1a87def8110e47c91 100644
--- a/third_party/WebKit/Source/platform/graphics/Image.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Image.cpp
@@ -105,7 +105,8 @@ void Image::drawTiled(GraphicsContext& ctxt,
const FloatRect oneTileRect = computeTileContaining(
destRect.location(), scaledTileSize, srcPoint, repeatSpacing);
- // Check and see if a single draw of the image can cover the entire area we are supposed to tile.
+ // Check and see if a single draw of the image can cover the entire area we
+ // are supposed to tile.
if (oneTileRect.contains(destRect)) {
const FloatRect visibleSrcRect =
computeSubsetForTile(oneTileRect, destRect, intrinsicTileSize);
@@ -121,7 +122,8 @@ void Image::drawTiled(GraphicsContext& ctxt,
startAnimation();
}
-// FIXME: Merge with the other drawTiled eventually, since we need a combination of both for some things.
+// FIXME: Merge with the other drawTiled() function eventually, since we need a
+// combination of both for some things.
void Image::drawTiled(GraphicsContext& ctxt,
const FloatRect& dstRect,
const FloatRect& srcRect,
@@ -155,14 +157,15 @@ void Image::drawTiled(GraphicsContext& ctxt,
(srcRect.height() * vRepetitions));
}
if (hRule == RoundTile || vRule == RoundTile) {
- // High interpolation quality rounds the scaled tile to an integer size (see Image::drawPattern).
- // To avoid causing a visual problem, linear interpolation must be used instead.
+ // High quality interpolation rounds the scaled tile to an integer size (see
+ // Image::drawPattern). To avoid causing a visual problem, linear
+ // interpolation must be used instead.
// FIXME: Allow using high-quality interpolation in this case, too.
useLowInterpolationQuality = true;
}
- // We want to construct the phase such that the pattern is centered (when stretch is not
- // set for a particular rule).
+ // We want to construct the phase such that the pattern is centered (when
+ // stretch is not set for a particular rule).
float hPhase = tileScaleFactor.width() * srcRect.x();
float vPhase = tileScaleFactor.height() * srcRect.y();
float scaledTileWidth = tileScaleFactor.width() * srcRect.width();
@@ -196,8 +199,8 @@ sk_sp<SkShader> createPatternShader(const SkImage* image,
return image->makeShader(SkShader::kRepeat_TileMode,
SkShader::kRepeat_TileMode, &shaderMatrix);
- // Arbitrary tiling is currently only supported for SkPictureShader - so we use it instead
- // of a plain bitmap shader to implement spacing.
+ // Arbitrary tiling is currently only supported for SkPictureShader, so we use
+ // that instead of a plain bitmap shader to implement spacing.
const SkRect tileRect = SkRect::MakeWH(image->width() + spacing.width(),
image->height() + spacing.height());
@@ -282,7 +285,8 @@ bool Image::isTextureBacked() {
}
bool Image::applyShader(SkPaint& paint, const SkMatrix& localMatrix) {
- // Default shader impl: attempt to build a shader based on the current frame SkImage.
+ // Default shader impl: attempt to build a shader based on the current frame
+ // SkImage.
sk_sp<SkImage> image = imageForCurrentFrame();
if (!image)
return false;
@@ -290,7 +294,8 @@ bool Image::applyShader(SkPaint& paint, const SkMatrix& localMatrix) {
paint.setShader(image->makeShader(SkShader::kRepeat_TileMode,
SkShader::kRepeat_TileMode, &localMatrix));
- // Animation is normally refreshed in draw() impls, which we don't call when painting via shaders.
+ // Animation is normally refreshed in draw() impls, which we don't call when
+ // painting via shaders.
startAnimation();
return true;
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Image.h ('k') | third_party/WebKit/Source/platform/graphics/ImageBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698