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

Issue 1370803002: Base SkAutoTUnref on skstd::unique_ptr. (Closed)

Created:
5 years, 2 months ago by bungeman-skia
Modified:
5 years, 2 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Base SkAutoTUnref on skstd::unique_ptr. To further consolidate the various unique owning classes, this bases SkAutoTUnref on skstd::unique_ptr. Users are updated because of two breaking changes, swap now takes a reference and reset no longer returns its argument. Committed: https://skia.googlesource.com/skia/+/77a53de20d723ca21cc824fd97e68aaa60e022ea

Patch Set 1 #

Patch Set 2 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -46 lines) Patch
M include/core/SkRefCnt.h View 1 3 chunks +11 lines, -36 lines 0 comments Download
M src/core/SkPath.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M src/effects/SkGpuBlurUtils.cpp View 5 chunks +5 lines, -5 lines 0 comments Download
M tests/FontHostStreamTest.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M tools/CopyTilesRenderer.cpp View 1 chunk +1 line, -1 line 0 comments Download
M tools/PictureRenderer.cpp View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 29 (8 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1370803002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1370803002/1
5 years, 2 months ago (2015-09-25 20:16:55 UTC) #2
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-09-25 20:21:42 UTC) #4
bungeman-skia
By inspection this shouldn't affect Android, and I'm currently building Chromium locally to see.
5 years, 2 months ago (2015-09-25 20:43:09 UTC) #6
hal.canary
lgtm
5 years, 2 months ago (2015-09-25 20:46:56 UTC) #7
reed1
I'm fine with the api/semantics, but it reads funny (to me) to see a shared-ptr ...
5 years, 2 months ago (2015-09-25 22:49:24 UTC) #8
hal.canary
While we are at it, we can also define a copy-constructor and copy-assignment operator that ...
5 years, 2 months ago (2015-09-26 00:38:15 UTC) #9
bungeman-skia
On 2015/09/25 22:49:24, reed1 wrote: > I'm fine with the api/semantics, but it reads funny ...
5 years, 2 months ago (2015-09-26 16:11:37 UTC) #10
bungeman-skia
On 2015/09/26 16:11:37, bungeman1 wrote: > On 2015/09/25 22:49:24, reed1 wrote: > > I'm fine ...
5 years, 2 months ago (2015-09-26 16:13:30 UTC) #11
bungeman-skia
On 2015/09/26 00:38:15, Hal Canary wrote: > While we are at it, we can also ...
5 years, 2 months ago (2015-09-26 16:14:15 UTC) #12
mtklein
On 2015/09/26 16:14:15, bungeman1 wrote: > On 2015/09/26 00:38:15, Hal Canary wrote: > > While ...
5 years, 2 months ago (2015-09-27 07:16:58 UTC) #13
hal.canary
> Out of curiosity, has the movabilty been added here by inheriting from > unique_ptr?. ...
5 years, 2 months ago (2015-09-27 17:56:16 UTC) #14
mtklein
On 2015/09/27 17:56:16, Hal Canary wrote: > > Out of curiosity, has the movabilty been ...
5 years, 2 months ago (2015-09-27 21:57:49 UTC) #15
mtklein
(This CL totally lgtm.)
5 years, 2 months ago (2015-09-27 22:00:35 UTC) #16
hal.canary
On 2015/09/27 21:57:49, mtklein wrote: > Just not quite with you there yet on the ...
5 years, 2 months ago (2015-09-27 22:01:28 UTC) #17
mtklein_C
Anything holding this up?
5 years, 2 months ago (2015-10-01 17:13:53 UTC) #19
reed1
api lgtm
5 years, 2 months ago (2015-10-01 18:18:13 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1370803002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1370803002/1
5 years, 2 months ago (2015-10-01 18:58:16 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/builds/3439) Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot on client.skia (JOB_FAILED, ...
5 years, 2 months ago (2015-10-01 18:59:10 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1370803002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1370803002/20001
5 years, 2 months ago (2015-10-01 19:21:41 UTC) #27
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://skia.googlesource.com/skia/+/77a53de20d723ca21cc824fd97e68aaa60e022ea
5 years, 2 months ago (2015-10-01 19:28:53 UTC) #28
hal.canary
5 years, 2 months ago (2015-10-01 20:27:36 UTC) #29
Message was sent while issue was closed.
On 2015/09/26 00:38:15, Hal Canary wrote:
> While we are at it, we can also define a copy-constructor and copy-assignment
> operator that refs the pointer.

This is a potentially useful little function for "copying" an AutoUnref.

    template <class T> inline SkAutoTUnref<T> Copy(const SkAutoTUnref<T>& r) {
        return skstd::move(SkAutoTUnref<T>(SkSafeRef(r.get())));
    }

This allows

    SkAutoTUnref<MyClass> mycopy;
    mycopy = Copy(original);

or

    SkAutoTUnref<MyClass> mycopy(Copy(original));

Powered by Google App Engine
This is Rietveld 408576698