Revert "Allow null rect for saveLayer"
This reverts commit f2e9709266
.
Reason for revert: Breaking the build
Original change's description:
> Allow null rect for saveLayer
>
> Bug: skia:10043
> Change-Id: Ia049e72565810e1f72500141678e166027230535
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277097
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
TBR=kjlubick@google.com,dnfield@google.com
Change-Id: I0aae159380cbdfd4ead0f8e3e9c9de284c2dc103
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10043
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277182
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
This commit is contained in:
parent
3d44f73b64
commit
7957d53c80
@ -1071,13 +1071,8 @@ EMSCRIPTEN_BINDINGS(Skia) {
|
||||
.function("rotate", select_overload<void (SkScalar, SkScalar, SkScalar)>(&SkCanvas::rotate))
|
||||
.function("save", &SkCanvas::save)
|
||||
// 2 params
|
||||
.function("_saveLayer", optional_override([](SkCanvas& self,
|
||||
uintptr_t /* SkRect */ rectPtr,
|
||||
const SkPaint* paint) {
|
||||
// See comment above for uintptr_t explanation
|
||||
const SkRect* rect = reinterpret_cast<SkRect*>(rectPtr);
|
||||
return self.saveLayer(rect, paint);
|
||||
}), allow_raw_pointers())
|
||||
.function("saveLayer", select_overload<int (const SkRect&, const SkPaint*)>(&SkCanvas::saveLayer),
|
||||
allow_raw_pointers())
|
||||
// 3 params (effectively with SaveLayerRec, but no bounds)
|
||||
.function("saveLayer", saveLayerRec, allow_raw_pointers())
|
||||
// 4 params (effectively with SaveLayerRec)
|
||||
|
@ -194,6 +194,7 @@ var CanvasKit = {
|
||||
restoreToCount: function() {},
|
||||
rotate: function() {},
|
||||
save: function() {},
|
||||
saveLayer: function() {},
|
||||
scale: function() {},
|
||||
skew: function() {},
|
||||
translate: function() {},
|
||||
@ -203,7 +204,6 @@ var CanvasKit = {
|
||||
_drawPoints: function() {},
|
||||
_drawSimpleText: function() {},
|
||||
_readPixels: function() {},
|
||||
_saveLayer: function() {},
|
||||
_writePixels: function() {},
|
||||
delete: function() {},
|
||||
},
|
||||
@ -839,7 +839,6 @@ CanvasKit.SkImage.prototype.makeShader = function() {};
|
||||
CanvasKit.SkCanvas.prototype.drawAtlas = function() {};
|
||||
CanvasKit.SkCanvas.prototype.drawPoints = function() {};
|
||||
CanvasKit.SkCanvas.prototype.drawText = function() {};
|
||||
CanvasKit.SkCanvas.prototype.saveLayer = function() {};
|
||||
/** @return {Uint8Array} */
|
||||
CanvasKit.SkCanvas.prototype.readPixels = function() {};
|
||||
CanvasKit.SkCanvas.prototype.writePixels = function() {};
|
||||
|
@ -961,14 +961,6 @@ CanvasKit.onRuntimeInitialized = function() {
|
||||
return pixels;
|
||||
}
|
||||
|
||||
// Returns a the save count of the canvas as an integer.
|
||||
CanvasKit.SkCanvas.prototype.saveLayer = function(rect, paint) {
|
||||
var rectPtr = copy1dArray(rect);
|
||||
var saveCount = this._saveLayer(rectPtr, paint);
|
||||
CanvasKit._free(rectPtr);
|
||||
return saveCount;
|
||||
}
|
||||
|
||||
// pixels is a TypedArray. No matter the input size, it will be treated as
|
||||
// a Uint8Array (essentially, a byte array).
|
||||
CanvasKit.SkCanvas.prototype.writePixels = function(pixels, srcWidth, srcHeight,
|
||||
|
Loading…
Reference in New Issue
Block a user