Skip to content
Permalink
Browse files
Construct default winding string arguments in CanvasRenderingContext2…
…D from ASCIILiteral objects

https://bugs.webkit.org/show_bug.cgi?id=148441

Reviewed by Darin Adler.

* html/canvas/CanvasRenderingContext2D.h: Use ASCIILiteral objects to construct
the default values for the winding arguments. This will avoid copying the string
data every time the methods are invoked with the default argument value.


Canonical link: https://commits.webkit.org/166826@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189248 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
zdobersek committed Sep 2, 2015
1 parent d588204 commit 7c4dcc01ad62e13491057eef5c01e2e56ad551fe
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
@@ -1,3 +1,14 @@
2015-09-02 Zan Dobersek <zdobersek@igalia.com>

Construct default winding string arguments in CanvasRenderingContext2D from ASCIILiteral objects
https://bugs.webkit.org/show_bug.cgi?id=148441

Reviewed by Darin Adler.

* html/canvas/CanvasRenderingContext2D.h: Use ASCIILiteral objects to construct
the default values for the winding arguments. This will avoid copying the string
data every time the methods are invoked with the default argument value.

2015-09-02 Carlos Garcia Campos <cgarcia@igalia.com>

Unreviewed. Fix GObject DOM bindings API breaks after r189182.
@@ -132,18 +132,18 @@ class CanvasRenderingContext2D final : public CanvasRenderingContext, public Can

void beginPath();

void fill(const String& winding = "nonzero");
void fill(const String& winding = ASCIILiteral("nonzero"));
void stroke();
void clip(const String& winding = "nonzero");
void clip(const String& winding = ASCIILiteral("nonzero"));

void fill(DOMPath*, const String& winding = "nonzero");
void fill(DOMPath*, const String& winding = ASCIILiteral("nonzero"));
void stroke(DOMPath*);
void clip(DOMPath*, const String& winding = "nonzero");
void clip(DOMPath*, const String& winding = ASCIILiteral("nonzero"));

bool isPointInPath(const float x, const float y, const String& winding = "nonzero");
bool isPointInPath(const float x, const float y, const String& winding = ASCIILiteral("nonzero"));
bool isPointInStroke(const float x, const float y);

bool isPointInPath(DOMPath*, const float x, const float y, const String& winding = "nonzero");
bool isPointInPath(DOMPath*, const float x, const float y, const String& winding = ASCIILiteral("nonzero"));
bool isPointInStroke(DOMPath*, const float x, const float y);

void clearRect(float x, float y, float width, float height);

0 comments on commit 7c4dcc0

Please sign in to comment.