aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'include/gpu')
-rw-r--r--include/gpu/GrContextFactory.h10
-rw-r--r--include/gpu/GrProgramStageFactory.h5
2 files changed, 8 insertions, 7 deletions
diff --git a/include/gpu/GrContextFactory.h b/include/gpu/GrContextFactory.h
index 0a662745af..65bf597aa9 100644
--- a/include/gpu/GrContextFactory.h
+++ b/include/gpu/GrContextFactory.h
@@ -68,23 +68,23 @@ public:
SkAutoTUnref<GrContext> grCtx;
switch (type) {
case kNative_GLContextType:
- glCtx.reset(new SkNativeGLContext());
+ glCtx.reset(SkNEW(SkNativeGLContext));
break;
#ifdef SK_ANGLE
case kANGLE_GLContextType:
- glCtx.reset(new SkANGLEGLContext());
+ glCtx.reset(SkNEW(SkANGLEGLContext));
break;
#endif
#ifdef SK_MESA
case kMESA_GLContextType:
- glCtx.reset(new SkMesaGLContext());
+ glCtx.reset(SkNEW(SkMesaGLContext));
break;
#endif
case kNull_GLContextType:
- glCtx.reset(new SkNullGLContext());
+ glCtx.reset(SkNEW(SkNullGLContext));
break;
case kDebug_GLContextType:
- glCtx.reset(new SkDebugGLContext());
+ glCtx.reset(SkNEW(SkDebugGLContext));
break;
}
static const int kBogusSize = 1;
diff --git a/include/gpu/GrProgramStageFactory.h b/include/gpu/GrProgramStageFactory.h
index c01b3f08a0..d133beb9fc 100644
--- a/include/gpu/GrProgramStageFactory.h
+++ b/include/gpu/GrProgramStageFactory.h
@@ -95,7 +95,7 @@ public:
the object. */
virtual GLProgramStage* createGLInstance(
const GrCustomStage& stage) const SK_OVERRIDE {
- return new GLProgramStage(*this, stage);
+ return SkNEW_ARGS(GLProgramStage, (*this, stage));
}
/** This class is a singleton. This function returns the single instance.
@@ -104,7 +104,8 @@ public:
static SkAlignedSTStorage<1, GrTProgramStageFactory> gInstanceMem;
static const GrTProgramStageFactory* gInstance;
if (!gInstance) {
- gInstance = new (gInstanceMem.get()) GrTProgramStageFactory();
+ gInstance = SkNEW_PLACEMENT(gInstanceMem.get(),
+ GrTProgramStageFactory);
}
return *gInstance;
}