Closed Bug 1004374 Opened 12 years ago Closed 12 years ago

[Skia] Remove Moz2D requirement for SK_SUPPORT_LEGACY_LAYERRASTERIZER_API

Categories

(Core :: Graphics, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: gw280, Assigned: wlitwinczyk)

Details

Attachments

(1 file, 2 obsolete files)

Skia are deprecating some of their layer rasterizer APIs, and to ease the transition the old ones are still available behind an ifdef SK_SUPPORT_LEGACY_LAYERRASTERIZER_API We should remove our usage of these old APIs and switch to the new ones. Ideal as an intern bug.
Assignee: nobody → wlitwinczyk
Attached patch Removed usage of legacy api (obsolete) — Splinter Review
Attachment #8427386 - Flags: review?(gwright)
Comment on attachment 8427386 [details] [diff] [review] Removed usage of legacy api Review of attachment 8427386 [details] [diff] [review]: ----------------------------------------------------------------- This looks fine. I was mostly concerned about the refcnt of the SkLayerRasterizer object but this looks correct.
Attachment #8427386 - Flags: review?(gwright) → review+
That being said, I'd rather we used an SkAutoTUnref<SkLayerRasterizer> instead of calling SkSafeUnref() on the returned object.
Attached patch skia_bug_1004374 (obsolete) — Splinter Review
Changed SkSafeUnref -> SkAutoTUnref
Attachment #8427386 - Attachment is obsolete: true
Attachment #8443644 - Flags: review?(gwright)
Comment on attachment 8443644 [details] [diff] [review] skia_bug_1004374 Review of attachment 8443644 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me, with minor nit (basically to match the way we use SkAutoTUnref in the rest of DrawTargetSkia, such as in Init()). ::: gfx/2d/DrawTargetSkia.cpp @@ +537,5 @@ > SetPaintPattern(maskPaint, aMask, tmpBitmap); > > + SkLayerRasterizer::Builder builder; > + builder.addLayer(maskPaint); > + SkAutoTUnref<SkRasterizer> raster(paint.mPaint.setRasterizer(builder.detachRasterizer())); I would really rather have: SkAutoTUnref<SkRasterizer> raster(builder.detachRasterizer()); paint.mPaint.setRasterizer(raster.get());
Attachment #8443644 - Flags: review?(gwright) → review+
Attached patch skia_bug_1004374Splinter Review
r=gw280 carried forward
Attachment #8443644 - Attachment is obsolete: true
Attachment #8443654 - Flags: review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: