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

Unified Diff: src/gpu/GrLayerCache.h

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/gpu/GrGpuResourceCacheAccess.h ('k') | src/gpu/GrLayerCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrLayerCache.h
diff --git a/src/gpu/GrLayerCache.h b/src/gpu/GrLayerCache.h
index cf35de80b5c283f8454a90f74a346ae7d4956c3e..4ab0fa4eff658673dfbe6a26a1e274cf366510ea 100644
--- a/src/gpu/GrLayerCache.h
+++ b/src/gpu/GrLayerCache.h
@@ -86,7 +86,7 @@ public:
fIDMatrix.fInitialMat.getType(); // force initialization of type so hashes match
if (copyKey) {
- int* tempKey = SkNEW_ARRAY(int, keySize);
+ int* tempKey = new int[keySize];
memcpy(tempKey, key, keySize*sizeof(int));
fKey = tempKey;
} else {
@@ -100,7 +100,7 @@ public:
~Key() {
if (fFreeKey) {
- SkDELETE_ARRAY(fKey);
+ delete[] fKey;
}
}
@@ -143,10 +143,14 @@ public:
static uint32_t Hash(const Key& key) { return key.hash(); }
// GrCachedLayer proper
- GrCachedLayer(uint32_t pictureID, int start, int stop,
- const SkIRect& srcIR, const SkIRect& dstIR,
+ GrCachedLayer(uint32_t pictureID,
+ int start,
+ int stop,
+ const SkIRect& srcIR,
+ const SkIRect& dstIR,
const SkMatrix& ctm,
- const int* key, int keySize,
+ const int* key,
+ int keySize,
const SkPaint* paint)
: fKey(pictureID, ctm, key, keySize, true)
, fStart(start)
@@ -154,7 +158,7 @@ public:
, fSrcIR(srcIR)
, fDstIR(dstIR)
, fOffset(SkIPoint::Make(0, 0))
- , fPaint(paint ? SkNEW_ARGS(SkPaint, (*paint)) : NULL)
+ , fPaint(paint ? new SkPaint(*paint) : NULL)
, fFilter(NULL)
, fTexture(NULL)
, fRect(SkIRect::MakeEmpty())
@@ -174,7 +178,7 @@ public:
~GrCachedLayer() {
SkSafeUnref(fTexture);
SkSafeUnref(fFilter);
- SkDELETE(fPaint);
+ delete fPaint;
}
uint32_t pictureID() const { return fKey.pictureID(); }
« no previous file with comments | « src/gpu/GrGpuResourceCacheAccess.h ('k') | src/gpu/GrLayerCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698