-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathfabric+5.3.0.patch
22 lines (21 loc) · 1.14 KB
/
fabric+5.3.0.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/node_modules/fabric/dist/fabric.js b/node_modules/fabric/dist/fabric.js
index faee7fc..02e5ae3 100644
--- a/node_modules/fabric/dist/fabric.js
+++ b/node_modules/fabric/dist/fabric.js
@@ -12591,7 +12591,7 @@ fabric.PatternBrush = fabric.util.createClass(fabric.PencilBrush, /** @lends fab
this.cacheCanvasEl = this._createCanvasElement();
this.cacheCanvasEl.setAttribute('width', this.width);
this.cacheCanvasEl.setAttribute('height', this.height);
- this.contextCache = this.cacheCanvasEl.getContext('2d');
+ this.contextCache = this.cacheCanvasEl.getContext('2d', {willReadFrequently: true});
},
/**
@@ -15103,7 +15103,7 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @lends fabric.Stati
_createCacheCanvas: function() {
this._cacheProperties = {};
this._cacheCanvas = fabric.util.createCanvasElement();
- this._cacheContext = this._cacheCanvas.getContext('2d');
+ this._cacheContext = this._cacheCanvas.getContext('2d', {willReadFrequently: true});
this._updateCacheCanvas();
// if canvas gets created, is empty, so dirty.
this.dirty = true;