Changeset 225602 in webkit
- Timestamp:
- Dec 6, 2017 4:02:55 PM (6 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r225600 r225602 1 2017-12-06 Devin Rousso <webkit@devinrousso.com> 2 3 Web Inspector: Canvas: spurious warnings shown for commands that changed pixel contents 4 https://bugs.webkit.org/show_bug.cgi?id=180505 5 <rdar://problem/35891651> 6 7 Reviewed by Brian Burg. 8 9 * UserInterface/Models/RecordingAction.js: 10 (WI.RecordingAction.prototype.apply.getContent): 11 (WI.RecordingAction.prototype.apply): 12 1 13 2017-12-06 Devin Rousso <webkit@devinrousso.com> 2 14 -
trunk/Source/WebInspectorUI/UserInterface/Models/RecordingAction.js
r225527 r225602 122 122 123 123 function getContent() { 124 if (context instanceof CanvasRenderingContext2D) 125 return context.getImageData(0, 0, context.canvas.width, context.canvas.height); 124 if (context instanceof CanvasRenderingContext2D) { 125 let imageData = context.getImageData(0, 0, context.canvas.width, context.canvas.height); 126 return [imageData.width, imageData.height, ...imageData.data]; 127 } 126 128 127 129 if (context instanceof WebGLRenderingContext || context instanceof WebGL2RenderingContext) { 128 130 let pixels = new Uint8Array(context.drawingBufferWidth * context.drawingBufferHeight * 4); 129 131 context.readPixels(0, 0, context.canvas.width, context.canvas.height, context.RGBA, context.UNSIGNED_BYTE, pixels); 130 return pixels;132 return [...pixels]; 131 133 } 132 134 … … 155 157 156 158 if (shouldCheckForChange) { 157 this._hasVisibleEffect = Array.shallowEqual(contentBefore, getContent());159 this._hasVisibleEffect = !Array.shallowEqual(contentBefore, getContent()); 158 160 if (!this._hasVisibleEffect) 159 161 this.dispatchEventToListeners(WI.RecordingAction.Event.HasVisibleEffectChanged);
Note: See TracChangeset
for help on using the changeset viewer.