Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8fa9b7e7 authored by Raph Levien's avatar Raph Levien Committed by Android Git Automerger
Browse files

am a7e1d873: am c4445abb: Merge "Bump refcount of canvas created for Picture" into lmp-dev

* commit 'a7e1d87386ebbd8d89f2d37a121840038c96af60':
  Bump refcount of canvas created for Picture
parents a7807f86 8dbb94a8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -42,6 +42,10 @@ Canvas* Picture::beginRecording(int width, int height) {
    mWidth = width;
    mHeight = height;
    SkCanvas* canvas = mRecorder->beginRecording(width, height, NULL, 0);
    // the java side will wrap this guy in a Canvas.java, which will call
    // unref in its finalizer, so we have to ref it here, so that both that
    // Canvas.java and our picture can both be owners
    canvas->ref();
    return Canvas::create_canvas(canvas);
}