Skip to content

Commit

Permalink
Bug 1340627 - part 7 - fix Skia NPAPI for Skia m59. r=mchang
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: G8ugt7I8ZKx
  • Loading branch information
lsalzman committed May 10, 2017
1 parent 69f5c51 commit c7e8752
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions other-licenses/skia-npapi/ANPCanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down
3 changes: 1 addition & 2 deletions other-licenses/skia-npapi/SkANP.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
};

Expand Down

0 comments on commit c7e8752

Please sign in to comment.