Bug 1340627 - part 7 - fix Skia NPAPI for Skia m59. r=mchang

MozReview-Commit-ID: G8ugt7I8ZKx
This commit is contained in:
Lee Salzman 2017-05-09 22:31:07 -04:00
parent 9e92454bc6
commit 5bd9e996df
2 changed files with 3 additions and 4 deletions

View File

@ -80,7 +80,7 @@ static void anp_getTotalMatrix(ANPCanvas* canvas, ANPMatrix* matrix) {
static bool anp_getLocalClipBounds(ANPCanvas* canvas, ANPRectF* r,
bool antialias) {
SkRect bounds;
if (canvas->skcanvas->getClipBounds(&bounds)) {
if (canvas->skcanvas->getLocalClipBounds(&bounds)) {
SkANP::SetRect(r, bounds);
return true;
}
@ -89,7 +89,7 @@ static bool anp_getLocalClipBounds(ANPCanvas* canvas, ANPRectF* r,
static bool anp_getDeviceClipBounds(ANPCanvas* canvas, ANPRectI* r) {
SkIRect bounds;
if (canvas->skcanvas->getClipDeviceBounds(&bounds)) {
if (canvas->skcanvas->getDeviceClipBounds(&bounds)) {
SkANP::SetRect(r, bounds);
return true;
}

View File

@ -56,11 +56,10 @@ struct ANPCanvas {
// redirect all drawing to the specific SkCanvas
explicit ANPCanvas(SkCanvas* other) {
skcanvas = other;
skcanvas->ref();
}
~ANPCanvas() {
skcanvas->unref();
delete skcanvas;
}
};