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

Unified Diff: Source/platform/graphics/GraphicsContext.h

Issue 815933006: Change all uses of the RoundedRect class to use FloatRoundedRect instead. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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 | « Source/platform/geometry/RoundedRectTest.cpp ('k') | Source/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsContext.h
diff --git a/Source/platform/graphics/GraphicsContext.h b/Source/platform/graphics/GraphicsContext.h
index f179e4d5b6cee35294385056470b2db282084e69..5dcf7bfcf0f65f7e83c41a7e85d89798185e76d3 100644
--- a/Source/platform/graphics/GraphicsContext.h
+++ b/Source/platform/graphics/GraphicsContext.h
@@ -31,6 +31,7 @@
#include "platform/PlatformExport.h"
#include "platform/fonts/Font.h"
#include "platform/geometry/FloatRect.h"
+#include "platform/geometry/FloatRoundedRect.h"
#include "platform/graphics/DashArray.h"
#include "platform/graphics/DrawLooperBuilder.h"
#include "platform/graphics/ImageBufferSurface.h"
@@ -250,17 +251,17 @@ public:
void fillRect(const FloatRect&);
void fillRect(const FloatRect&, const Color&);
void fillRect(const FloatRect&, const Color&, CompositeOperator);
- void fillRoundedRect(const IntRect&, const IntSize& topLeft, const IntSize& topRight, const IntSize& bottomLeft, const IntSize& bottomRight, const Color&);
- void fillRoundedRect(const RoundedRect&, const Color&);
+ void fillRoundedRect(const FloatRect&, const FloatSize& topLeft, const FloatSize& topRight, const FloatSize& bottomLeft, const FloatSize& bottomRight, const Color&);
+ void fillRoundedRect(const FloatRoundedRect&, const Color&);
void clearRect(const FloatRect&);
void strokeRect(const FloatRect&);
void strokeRect(const FloatRect&, float lineWidth);
- void fillBetweenRoundedRects(const IntRect&, const IntSize& outerTopLeft, const IntSize& outerTopRight, const IntSize& outerBottomLeft, const IntSize& outerBottomRight,
- const IntRect&, const IntSize& innerTopLeft, const IntSize& innerTopRight, const IntSize& innerBottomLeft, const IntSize& innerBottomRight, const Color&);
- void fillBetweenRoundedRects(const RoundedRect&, const RoundedRect&, const Color&);
+ void fillBetweenRoundedRects(const FloatRect&, const FloatSize& outerTopLeft, const FloatSize& outerTopRight, const FloatSize& outerBottomLeft, const FloatSize& outerBottomRight,
+ const FloatRect&, const FloatSize& innerTopLeft, const FloatSize& innerTopRight, const FloatSize& innerBottomLeft, const FloatSize& innerBottomRight, const Color&);
+ void fillBetweenRoundedRects(const FloatRoundedRect&, const FloatRoundedRect&, const Color&);
void drawPicture(const SkPicture*);
void compositePicture(SkPicture*, const FloatRect& dest, const FloatRect& src, CompositeOperator, WebBlendMode);
@@ -293,10 +294,11 @@ public:
void clip(const IntRect& rect) { clipRect(rect); }
void clip(const FloatRect& rect) { clipRect(rect); }
- void clipRoundedRect(const RoundedRect&, SkRegion::Op = SkRegion::kIntersect_Op);
+ void clipRoundedRect(const FloatRoundedRect&, SkRegion::Op = SkRegion::kIntersect_Op);
void clipOut(const IntRect& rect) { clipRect(rect, NotAntiAliased, SkRegion::kDifference_Op); }
+ void clipOut(const FloatRect& rect) { clipRect(rect, NotAntiAliased, SkRegion::kDifference_Op); }
void clipOut(const Path&);
- void clipOutRoundedRect(const RoundedRect&);
+ void clipOutRoundedRect(const FloatRoundedRect&);
void clipPath(const Path&, WindRule = RULE_EVENODD, AntiAliasingMode = AntiAliased);
void clipPath(const SkPath&, AntiAliasingMode = NotAntiAliased, SkRegion::Op = SkRegion::kIntersect_Op);
void clipPolygon(size_t numPoints, const FloatPoint*, bool antialias);
@@ -350,7 +352,7 @@ public:
LeftEdge = 1 << 4
};
typedef unsigned Edges;
- void drawInnerShadow(const RoundedRect&, const Color& shadowColor, const IntSize shadowOffset, int shadowBlur, int shadowSpread, Edges clippedEdges = NoEdge);
+ void drawInnerShadow(const FloatRoundedRect&, const Color& shadowColor, const IntSize shadowOffset, int shadowBlur, int shadowSpread, Edges clippedEdges = NoEdge);
// ---------- Transformation methods -----------------
// Note that the getCTM method returns only the current transform from Blink's perspective,
@@ -425,7 +427,7 @@ private:
}
static void setPathFromPoints(SkPath*, size_t, const FloatPoint*);
- static void setRadii(SkVector*, IntSize, IntSize, IntSize, IntSize);
+ static void setRadii(SkVector*, FloatSize, FloatSize, FloatSize, FloatSize);
static PassRefPtr<SkColorFilter> WebCoreColorFilterToSkiaColorFilter(ColorFilter);
@@ -481,7 +483,7 @@ private:
void didDrawTextInRect(const SkRect& textRect);
- void fillRectWithRoundedHole(const IntRect&, const RoundedRect& roundedHoleRect, const Color&);
+ void fillRectWithRoundedHole(const FloatRect&, const FloatRoundedRect& roundedHoleRect, const Color&);
bool isRecording() const;
« no previous file with comments | « Source/platform/geometry/RoundedRectTest.cpp ('k') | Source/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698