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

Unified Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp

Issue 1886063002: Make canvas filters use the font size in effect when the filter is set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/modules/canvas2d/CanvasRenderingContext2D.cpp
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
index 9780f2b99e1f1d9992847d5b5492790848f68079..23a7b19e7df8b6649422c1e3c27359b4888bd885 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
@@ -372,12 +372,17 @@ void CanvasRenderingContext2D::didDraw(const SkIRect& dirtyRect)
bool CanvasRenderingContext2D::stateHasFilter()
{
- return state().hasFilter(canvas(), accessFont(), canvas()->size(), this);
+ return state().hasFilter(canvas(), canvas()->size(), this);
}
SkImageFilter* CanvasRenderingContext2D::stateGetFilter()
{
- return state().getFilter(canvas(), accessFont(), canvas()->size(), this);
+ return state().getFilter(canvas(), canvas()->size(), this);
+}
+
+void CanvasRenderingContext2D::snapshotStateForFilter()
+{
+ modifiableState().setFontForFilter(accessFont());
}
SkCanvas* CanvasRenderingContext2D::drawingCanvas() const

Powered by Google App Engine
This is Rietveld 408576698