Index: src/utils/SkCanvasStateUtils.cpp |
diff --git a/src/utils/SkCanvasStateUtils.cpp b/src/utils/SkCanvasStateUtils.cpp |
index 12ceefcf2f02b24119acc5e7deabd1b681c63293..8ab853dbf38e012dbbca4770a961c3f19cc12951 100644 |
--- a/src/utils/SkCanvasStateUtils.cpp |
+++ b/src/utils/SkCanvasStateUtils.cpp |
@@ -206,7 +206,7 @@ SkCanvasState* SkCanvasStateUtils::CaptureCanvasState(SkCanvas* canvas) { |
return NULL; |
} |
- SkAutoTDelete<SkCanvasState_v1> canvasState(SkNEW_ARGS(SkCanvasState_v1, (canvas))); |
+ SkAutoTDelete<SkCanvasState_v1> canvasState(new SkCanvasState_v1(canvas)); |
// decompose the total matrix and clip |
setup_MC_state(&canvasState->mcState, canvas->getTotalMatrix(), |
@@ -311,7 +311,7 @@ static SkCanvas* create_canvas_from_canvas_layer(const SkCanvasLayerState& layer |
SkASSERT(!bitmap.empty()); |
SkASSERT(!bitmap.isNull()); |
- SkAutoTUnref<SkCanvas> canvas(SkNEW_ARGS(SkCanvas, (bitmap))); |
+ SkAutoTUnref<SkCanvas> canvas(new SkCanvas(bitmap)); |
// setup the matrix and clip |
setup_canvas_from_MC_state(layerState.mcState, canvas.get()); |
@@ -330,7 +330,7 @@ SkCanvas* SkCanvasStateUtils::CreateFromCanvasState(const SkCanvasState* state) |
return NULL; |
} |
- SkAutoTUnref<SkCanvasStack> canvas(SkNEW_ARGS(SkCanvasStack, (state->width, state->height))); |
+ SkAutoTUnref<SkCanvasStack> canvas(new SkCanvasStack(state->width, state->height)); |
// setup the matrix and clip on the n-way canvas |
setup_canvas_from_MC_state(state_v1->mcState, canvas); |
@@ -355,5 +355,5 @@ void SkCanvasStateUtils::ReleaseCanvasState(SkCanvasState* state) { |
// Upcast to the correct version of SkCanvasState. This avoids having a virtual destructor on |
// SkCanvasState. That would be strange since SkCanvasState has no other virtual functions, and |
// instead uses the field "version" to determine how to behave. |
- SkDELETE(static_cast<SkCanvasState_v1*>(state)); |
+ delete static_cast<SkCanvasState_v1*>(state); |
} |