Backed out changeset a874592cff0a (bug 1340627)

This commit is contained in:
Carsten "Tomcat" Book 2017-05-11 12:51:51 +02:00
Родитель 1ff3d76838
Коммит 0732dbbae0
2 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

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

Просмотреть файл

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