Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(261)

Issue 6384043: SkNEW_PLACEMENT(Ganesh, memory management) (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 4 months ago by TomH
Modified:
12 years, 4 months ago
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Addresses http://code.google.com/p/skia/issues/detail?id=687 (nee http://code.google.com/p/skia/issues/detail?id=598) by wrapping SkNEW macros around all the new calls in Ganesh. Adds support for placement new to SkNEW macro family defined in SkPostConfig.h.

Patch Set 1 #

Patch Set 2 : Use SkTemplatesPriv #

Unified diffs Side-by-side diffs Delta from patch set Stats (+160 lines, -113 lines) Patch
M include/gpu/GrContextFactory.h View 1 chunk +5 lines, -5 lines 0 comments Download
M include/gpu/GrProgramStageFactory.h View 1 3 chunks +5 lines, -2 lines 0 comments Download
M src/core/SkTemplatesPriv.h View 1 2 chunks +31 lines, -4 lines 0 comments Download
M src/gpu/GrAAHairLinePathRenderer.cpp View 2 chunks +3 lines, -4 lines 0 comments Download
M src/gpu/GrAddPathRenderers_default.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrAllocator.h View 1 3 chunks +5 lines, -2 lines 0 comments Download
M src/gpu/GrAtlas.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/GrClipMaskManager.h View 1 3 chunks +3 lines, -2 lines 0 comments Download
M src/gpu/GrContext.cpp View 9 chunks +20 lines, -18 lines 0 comments Download
M src/gpu/GrGpu.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M src/gpu/GrGpuFactory.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrPathRendererChain.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M src/gpu/GrPlotMgr.h View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrRectanizer.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrRectanizer_fifo.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrRedBlackTree.h View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrResourceCache.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrStencilAndCoverPathRenderer.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrTextContext.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrTextStrike.cpp View 1 chunk +4 lines, -3 lines 0 comments Download
M src/gpu/SkGpuCanvas.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/SkGpuDevice.cpp View 6 chunks +17 lines, -16 lines 0 comments Download
M src/gpu/SkGrFontScaler.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/SkGrPixelRef.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/app-android.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/gl/GrGLCreateNullInterface.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/gl/GrGLTexture.cpp View 2 chunks +6 lines, -4 lines 0 comments Download
M src/gpu/gl/GrGpuGL.cpp View 8 chunks +23 lines, -19 lines 0 comments Download
M src/gpu/gl/GrGpuGL_unittest.cpp View 4 chunks +15 lines, -12 lines 0 comments Download
M src/gpu/gr_hello_world.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 6
TomH
12 years, 4 months ago (2012-07-09 18:19:35 UTC) #1
reed1
How does your new macro fit in with the utilities in SkTemplatesPriv.h?
12 years, 4 months ago (2012-07-09 18:28:53 UTC) #2
TomH
I didn't know about those! I don't like the look of them, though. #ifdef SK_BUILD_FOR_WIN32 ...
12 years, 4 months ago (2012-07-09 18:32:55 UTC) #3
reed1
Lets fix 'em if they're broken, and decide if all placement macros should be in ...
12 years, 4 months ago (2012-07-09 18:39:10 UTC) #4
TomH
Patch set 2 uses SkTemplatesPriv. At the moment I have four problems with it: 1. ...
12 years, 4 months ago (2012-07-09 19:35:32 UTC) #5
TomH
12 years, 4 months ago (2012-07-09 20:20:10 UTC) #6
After verbal LGTM from bsalomon@ and reed@, reverted to patchset 1 and committed
as r4492.

Mike will investigate #1.
#2 can be worked around by adding a cpp file to implement that chunk of
GrProgramStageFactory, which probably doesn't need to be inlined.
#3 can be hacked around with documentation, although that weakens the power of
SkUserConfig.h
#4 turns out to be my source tree being out-of-date, missing r4478.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b