Bug 1340627 - part 7 - fix Skia NPAPI for Skia m59. r=mchang
☠☠ backed out by ce2218406119 ☠ ☠
authorLee Salzman <lsalzman@mozilla.com>
Tue, 09 May 2017 22:31:07 -0400
changeset 357468 c691e2ab6a0cdc36a1725c5d2036184aa35db980
parent 357467 3cb4bceb8d793c30c9ec95ba6f409067e3021291
child 357469 f152be1fadb7a8e5c6cf75c7b6190b0908b1cc1f
push id31792
push usercbook@mozilla.com
push dateWed, 10 May 2017 13:07:59 +0000
treeherdermozilla-central@ebbcdaa5b580 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmchang
bugs1340627
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1340627 - part 7 - fix Skia NPAPI for Skia m59. r=mchang MozReview-Commit-ID: G8ugt7I8ZKx
other-licenses/skia-npapi/ANPCanvas.cpp
other-licenses/skia-npapi/SkANP.h
--- a/other-licenses/skia-npapi/ANPCanvas.cpp
+++ b/other-licenses/skia-npapi/ANPCanvas.cpp
@@ -75,26 +75,26 @@ static void anp_concat(ANPCanvas* canvas
 static void anp_getTotalMatrix(ANPCanvas* canvas, ANPMatrix* matrix) {
     const SkMatrix& src = canvas->skcanvas->getTotalMatrix();
     *matrix = *reinterpret_cast<const ANPMatrix*>(&src);
 }
 
 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;
     }
     return false;
 }
 
 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;
     }
     return false;
 }
 
 static void anp_drawColor(ANPCanvas* canvas, ANPColor color) {
     canvas->skcanvas->drawColor(color);
--- a/other-licenses/skia-npapi/SkANP.h
+++ b/other-licenses/skia-npapi/SkANP.h
@@ -51,21 +51,20 @@ struct ANPCanvas {
     // draw into the specified bitmap
     explicit ANPCanvas(const SkBitmap& bm) {
         skcanvas = new SkCanvas(bm);
     }
 
     // redirect all drawing to the specific SkCanvas
     explicit ANPCanvas(SkCanvas* other) {
         skcanvas = other;
-        skcanvas->ref();
     }
 
     ~ANPCanvas() {
-        skcanvas->unref();
+        delete skcanvas;
     }
 };
 
 class SkANP {
 public:
     static SkRect* SetRect(SkRect* dst, const ANPRectF& src);
     static SkIRect* SetRect(SkIRect* dst, const ANPRectI& src);
     static ANPRectI* SetRect(ANPRectI* dst, const SkIRect& src);