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

Side by Side Diff: src/gpu/GrRecordReplaceDraw.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 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/GrPrimitiveProcessor.h ('k') | src/gpu/GrReducedClip.h » ('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"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // also draws them with replaced layers. 57 // also draws them with replaced layers.
58 class ReplaceDraw : public SkRecords::Draw { 58 class ReplaceDraw : public SkRecords::Draw {
59 public: 59 public:
60 ReplaceDraw(SkCanvas* canvas, GrLayerCache* layerCache, 60 ReplaceDraw(SkCanvas* canvas, GrLayerCache* layerCache,
61 SkPicture const* const drawablePicts[], int drawableCount, 61 SkPicture const* const drawablePicts[], int drawableCount,
62 const SkPicture* topLevelPicture, 62 const SkPicture* topLevelPicture,
63 const SkBigPicture* picture, 63 const SkBigPicture* picture,
64 const SkMatrix& initialMatrix, 64 const SkMatrix& initialMatrix,
65 SkPicture::AbortCallback* callback, 65 SkPicture::AbortCallback* callback,
66 const int* opIndices, int numIndices) 66 const int* opIndices, int numIndices)
67 : INHERITED(canvas, drawablePicts, NULL, drawableCount) 67 : INHERITED(canvas, drawablePicts, nullptr, drawableCount)
68 , fCanvas(canvas) 68 , fCanvas(canvas)
69 , fLayerCache(layerCache) 69 , fLayerCache(layerCache)
70 , fTopLevelPicture(topLevelPicture) 70 , fTopLevelPicture(topLevelPicture)
71 , fPicture(picture) 71 , fPicture(picture)
72 , fInitialMatrix(initialMatrix) 72 , fInitialMatrix(initialMatrix)
73 , fCallback(callback) 73 , fCallback(callback)
74 , fIndex(0) 74 , fIndex(0)
75 , fNumReplaced(0) { 75 , fNumReplaced(0) {
76 fOpIndexStack.append(numIndices, opIndices); 76 fOpIndexStack.append(numIndices, opIndices);
77 } 77 }
78 78
79 int draw() { 79 int draw() {
80 const SkBBoxHierarchy* bbh = fPicture->bbh(); 80 const SkBBoxHierarchy* bbh = fPicture->bbh();
81 const SkRecord* record = fPicture->record(); 81 const SkRecord* record = fPicture->record();
82 if (NULL == record) { 82 if (nullptr == record) {
83 return 0; 83 return 0;
84 } 84 }
85 85
86 fNumReplaced = 0; 86 fNumReplaced = 0;
87 87
88 fOps.rewind(); 88 fOps.rewind();
89 89
90 if (bbh) { 90 if (bbh) {
91 // Draw only ops that affect pixels in the canvas's current clip. 91 // Draw only ops that affect pixels in the canvas's current clip.
92 // The SkRecord and BBH were recorded in identity space. This canva s 92 // The SkRecord and BBH were recorded in identity space. This canva s
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 int GrRecordReplaceDraw(const SkPicture* picture, 212 int GrRecordReplaceDraw(const SkPicture* picture,
213 SkCanvas* canvas, 213 SkCanvas* canvas,
214 GrLayerCache* layerCache, 214 GrLayerCache* layerCache,
215 const SkMatrix& initialMatrix, 215 const SkMatrix& initialMatrix,
216 SkPicture::AbortCallback* callback) { 216 SkPicture::AbortCallback* callback) {
217 SkAutoCanvasRestore saveRestore(canvas, true /*save now, restore at exit*/); 217 SkAutoCanvasRestore saveRestore(canvas, true /*save now, restore at exit*/);
218 218
219 if (const SkBigPicture* bp = picture->asSkBigPicture()) { 219 if (const SkBigPicture* bp = picture->asSkBigPicture()) {
220 // TODO: drawablePicts? 220 // TODO: drawablePicts?
221 ReplaceDraw draw(canvas, layerCache, NULL, 0, 221 ReplaceDraw draw(canvas, layerCache, nullptr, 0,
222 bp, bp, 222 bp, bp,
223 initialMatrix, callback, NULL, 0); 223 initialMatrix, callback, nullptr, 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/GrPrimitiveProcessor.h ('k') | src/gpu/GrReducedClip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698