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

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

Issue 1949253004: Rounded background image fast path (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: todo Created 4 years, 7 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.h
diff --git a/third_party/WebKit/Source/platform/graphics/Image.h b/third_party/WebKit/Source/platform/graphics/Image.h
index 9bbd010949fd43a5af9de31f28dd684f3ebb44d5..e5ee4442ed44c225e9e6673f4fd2ef9e4d2fa676 100644
--- a/third_party/WebKit/Source/platform/graphics/Image.h
+++ b/third_party/WebKit/Source/platform/graphics/Image.h
@@ -44,6 +44,8 @@
class SkBitmap;
class SkCanvas;
class SkImage;
+class SkMatrix;
+class SkPaint;
namespace blink {
@@ -150,6 +152,19 @@ public:
virtual void draw(SkCanvas*, const SkPaint&, const FloatRect& dstRect, const FloatRect& srcRect, RespectImageOrientationEnum, ImageClampingMode) = 0;
+ virtual bool applyShader(SkPaint&, const SkMatrix* localMatrix);
+
+ // Compute the tile which contains a given point (assuming a repeating tile grid).
+ // The point and returned value are in destination grid space.
+ static FloatRect computeTileContaining(const FloatPoint&, const FloatSize& tileSize,
+ const FloatPoint& tilePhase, const FloatSize& tileSpacing);
+
+ // Compute the image subset which gets mapped onto dest, when the whole image is drawn into
+ // tile. Assumes the tile contains dest. The tile rect is in destination grid space while
+ // the return value is in image coordinate space.
+ static FloatRect computeSubsetForTile(const FloatRect& tile, const FloatRect& dest,
+ const FloatSize& imageSize);
+
protected:
Image(ImageObserver* = 0);
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp ('k') | third_party/WebKit/Source/platform/graphics/Image.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698