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

Issue 1314763009: Remove overly complicated GR_CREATE_STATIC_PROCESSOR macro (Closed)

Created:
5 years, 3 months ago by mdempsky
Modified:
5 years, 3 months ago
Reviewers:
*bsalomon, mtklein, mtklein_C
CC:
reviews_skia.org
Base URL:
https://chromium.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Remove overly complicated GR_CREATE_STATIC_PROCESSOR macro This macro was responsible for producing code like: static SkAlignedStorage<sizeof(Foo)> g_gFoo_Storage; static Foo* gFoo = new(g_gFoo_Storage.get()) Foo; static SkAutoTDestroy<Foo> gFoo_ad(gFoo); which would allocate static storage for an object of type Foo (g_gFoo_Storage), lazily instantiate the object in that memory (via gFoo's initializer), and then ensure that at global destruction time the object is destroyed (via gFoo_Ad's destructor). However, the exact same effect is achieved by just writing: static Foo gFoo; Committed: https://skia.googlesource.com/skia/+/38f1f6f9e590fc20b81015ceca9d642cbe02a2d9

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -17 lines) Patch
M include/gpu/GrProcessor.h View 2 chunks +1 line, -11 lines 0 comments Download
M src/effects/SkLumaColorFilter.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M src/gpu/effects/GrDitherEffect.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M tests/GLProgramsTest.cpp View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (4 generated)
mdempsky
5 years, 3 months ago (2015-08-27 18:38:52 UTC) #2
mtklein
lgtm It doesn't look like this changes: - thread safety (not thread safe before, not ...
5 years, 3 months ago (2015-08-27 18:59:48 UTC) #5
bsalomon
On 2015/08/27 18:59:48, mtklein wrote: > lgtm > > It doesn't look like this changes: ...
5 years, 3 months ago (2015-08-27 19:42:50 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1314763009/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1314763009/1
5 years, 3 months ago (2015-08-27 19:51:07 UTC) #8
commit-bot: I haz the power
5 years, 3 months ago (2015-08-27 19:57:04 UTC) #9
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://skia.googlesource.com/skia/+/38f1f6f9e590fc20b81015ceca9d642cbe02a2d9

Powered by Google App Engine
This is Rietveld 408576698