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

Commit 0f135f04 authored by Hal Canary's avatar Hal Canary
Browse files

use new SkPDFDocument API (no change in functionality)

Test: everything still compiles.
Test: `atest android.print.pdf.cts; atest android.graphics.pdf.cts` locally tested.

Change-Id: I1ee7ecf59b08b013f0df967bec3bb79e6e1a26b8
parent 174a48b5
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -21,11 +21,11 @@


#include "CreateJavaOutputStreamAdaptor.h"
#include "CreateJavaOutputStreamAdaptor.h"


#include "SkDocument.h"
#include "SkPDFDocument.h"
#include "SkPicture.h"
#include "SkPicture.h"
#include "SkPictureRecorder.h"
#include "SkPictureRecorder.h"
#include "SkStream.h"
#include "SkRect.h"
#include "SkRect.h"
#include "SkStream.h"


#include <hwui/Canvas.h>
#include <hwui/Canvas.h>


@@ -88,7 +88,7 @@ public:
    }
    }


    void write(SkWStream* stream) {
    void write(SkWStream* stream) {
        sk_sp<SkDocument> document = SkDocument::MakePDF(stream);
        sk_sp<SkDocument> document = SkPDF::MakeDocument(stream);
        for (unsigned i = 0; i < mPages.size(); i++) {
        for (unsigned i = 0; i < mPages.size(); i++) {
            PageRecord* page =  mPages[i];
            PageRecord* page =  mPages[i];