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

Unified Diff: src/utils/SkCanvasStateUtils.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/utils/SkCamera.cpp ('k') | src/utils/SkEventTracer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « src/utils/SkCamera.cpp ('k') | src/utils/SkEventTracer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698