Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Issue 8927001: Implement platform-independent DrawGlyphs for Flash. (Closed)

Created:
9 years ago by brettw
Modified:
9 years ago
Reviewers:
reed1
CC:
chromium-reviews, darin-cc_chromium.org
Visibility:
Public.

Description

Implement platform-independent DrawGlyphs for Flash. [ Re-land of 114076 http://codereview.chromium.org/8899015 ] This code was platform independent so could just be copied over into the platform independent file with no changes. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=114220

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+107 lines, -137 lines) Patch
M webkit/glue/webkit_glue.gypi View 1 chunk +0 lines, -1 line 0 comments Download
M webkit/plugins/ppapi/ppb_flash_impl.h View 1 chunk +0 lines, -16 lines 0 comments Download
M webkit/plugins/ppapi/ppb_flash_impl.cc View 4 chunks +107 lines, -1 line 0 comments Download
D webkit/plugins/ppapi/ppb_flash_impl_linux.cc View 1 chunk +0 lines, -119 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
reed1
9 years ago (2011-12-13 16:38:48 UTC) #1
I think we're leaking the typeface.

tf = Create();
// now the refcnt is 1
paint.setTypeface(tf);
// now the refcnt is 2
~paint
// now the refcnt is 1, leaked

Another pattern could be

SkTypeface* tf = Create();
SkAutoUnref aur(tf);

SkAutoCanvasRestore acr(canvas, true);

Now you can return at any point after acr, and nothing will leak or be
unbalanced. Passing true to acr executes the save() for you, and will
automatically call restore().

Powered by Google App Engine
This is Rietveld 408576698