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

Side by Side Diff: src/gpu/GrRecordReplaceDraw.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, 3 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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrPipelineBuilder.cpp ('k') | src/gpu/GrRectanizer_pow2.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrContext.h" 8 #include "GrContext.h"
9 #include "GrLayerCache.h" 9 #include "GrLayerCache.h"
10 #include "GrRecordReplaceDraw.h" 10 #include "GrRecordReplaceDraw.h"
11 #include "SkBigPicture.h" 11 #include "SkBigPicture.h"
12 #include "SkCanvasPriv.h" 12 #include "SkCanvasPriv.h"
13 #include "SkGrPixelRef.h" 13 #include "SkGrPixelRef.h"
14 #include "SkImage.h" 14 #include "SkImage.h"
15 #include "SkRecordDraw.h" 15 #include "SkRecordDraw.h"
16 #include "SkRecords.h" 16 #include "SkRecords.h"
17 17
18 static inline void wrap_texture(GrTexture* texture, int width, int height, SkBit map* result) { 18 static inline void wrap_texture(GrTexture* texture, int width, int height, SkBit map* result) {
19 SkImageInfo info = SkImageInfo::MakeN32Premul(width, height); 19 SkImageInfo info = SkImageInfo::MakeN32Premul(width, height);
20 result->setInfo(info); 20 result->setInfo(info);
21 result->setPixelRef(SkNEW_ARGS(SkGrPixelRef, (info, texture)))->unref(); 21 result->setPixelRef(new SkGrPixelRef(info, texture))->unref();
22 } 22 }
23 23
24 static inline void draw_replacement_bitmap(GrCachedLayer* layer, SkCanvas* canva s) { 24 static inline void draw_replacement_bitmap(GrCachedLayer* layer, SkCanvas* canva s) {
25 25
26 // Some image filter can totally filter away a layer (e.g., SkPictureImageFi lter's with 26 // Some image filter can totally filter away a layer (e.g., SkPictureImageFi lter's with
27 // no picture). 27 // no picture).
28 if (!layer->texture()) { 28 if (!layer->texture()) {
29 return; 29 return;
30 } 30 }
31 31
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 ReplaceDraw draw(canvas, layerCache, NULL, 0, 221 ReplaceDraw draw(canvas, layerCache, NULL, 0,
222 bp, bp, 222 bp, bp,
223 initialMatrix, callback, NULL, 0); 223 initialMatrix, callback, NULL, 0);
224 return draw.draw(); 224 return draw.draw();
225 } else { 225 } else {
226 // TODO: can we assume / assert this doesn't happen? 226 // TODO: can we assume / assert this doesn't happen?
227 picture->playback(canvas, callback); 227 picture->playback(canvas, callback);
228 return 0; 228 return 0;
229 } 229 }
230 } 230 }
OLDNEW
« no previous file with comments | « src/gpu/GrPipelineBuilder.cpp ('k') | src/gpu/GrRectanizer_pow2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698