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

Side by Side Diff: src/gpu/GrInOrderCommandBuilder.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/GrGpuResourceRef.cpp ('k') | src/gpu/GrLayerCache.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 2015 Google Inc. 2 * Copyright 2015 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 "GrInOrderCommandBuilder.h" 8 #include "GrInOrderCommandBuilder.h"
9 9
10 #include "GrBufferedDrawTarget.h" 10 #include "GrBufferedDrawTarget.h"
(...skipping 16 matching lines...) Expand all
27 27
28 GrTargetCommands::Cmd* GrInOrderCommandBuilder::recordDrawBatch(GrBatch* batch, 28 GrTargetCommands::Cmd* GrInOrderCommandBuilder::recordDrawBatch(GrBatch* batch,
29 const GrCaps& ca ps) { 29 const GrCaps& ca ps) {
30 GrBATCH_INFO("In-Recording (%s, %u)\n", batch->name(), batch->uniqueID()); 30 GrBATCH_INFO("In-Recording (%s, %u)\n", batch->name(), batch->uniqueID());
31 if (!this->cmdBuffer()->empty() && 31 if (!this->cmdBuffer()->empty() &&
32 Cmd::kDrawBatch_CmdType == this->cmdBuffer()->back().type()) { 32 Cmd::kDrawBatch_CmdType == this->cmdBuffer()->back().type()) {
33 DrawBatch* previous = static_cast<DrawBatch*>(&this->cmdBuffer()->back() ); 33 DrawBatch* previous = static_cast<DrawBatch*>(&this->cmdBuffer()->back() );
34 if (previous->batch()->combineIfPossible(batch, caps)) { 34 if (previous->batch()->combineIfPossible(batch, caps)) {
35 GrBATCH_INFO("\tBatching with (%s, %u)\n", 35 GrBATCH_INFO("\tBatching with (%s, %u)\n",
36 previous->batch()->name(), previous->batch()->uniqueID( )); 36 previous->batch()->name(), previous->batch()->uniqueID( ));
37 return NULL; 37 return nullptr;
38 } 38 }
39 } 39 }
40 40
41 return GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawBatch, (batch)); 41 return GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawBatch, (batch));
42 } 42 }
43 43
44 GrTargetCommands::Cmd* 44 GrTargetCommands::Cmd*
45 GrInOrderCommandBuilder::recordDrawPaths(State* state, 45 GrInOrderCommandBuilder::recordDrawPaths(State* state,
46 GrBufferedDrawTarget* bufferedDrawTarge t, 46 GrBufferedDrawTarget* bufferedDrawTarge t,
47 const GrPathProcessor* pathProc, 47 const GrPathProcessor* pathProc,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 previous->fState == state && 81 previous->fState == state &&
82 !opts.willColorBlendWithDst()) { 82 !opts.willColorBlendWithDst()) {
83 83
84 const int indexBytes = GrPathRange::PathIndexSizeInBytes(indexType); 84 const int indexBytes = GrPathRange::PathIndexSizeInBytes(indexType);
85 const int xformSize = GrPathRendering::PathTransformSize(transformTy pe); 85 const int xformSize = GrPathRendering::PathTransformSize(transformTy pe);
86 if (&previous->fIndices[previous->fCount * indexBytes] == savedIndic es && 86 if (&previous->fIndices[previous->fCount * indexBytes] == savedIndic es &&
87 (0 == xformSize || 87 (0 == xformSize ||
88 &previous->fTransforms[previous->fCount * xformSize] == savedTr ansforms)) { 88 &previous->fTransforms[previous->fCount * xformSize] == savedTr ansforms)) {
89 // Combine this DrawPaths call with the one previous. 89 // Combine this DrawPaths call with the one previous.
90 previous->fCount += count; 90 previous->fCount += count;
91 return NULL; 91 return nullptr;
92 } 92 }
93 } 93 }
94 } 94 }
95 95
96 DrawPaths* dp = GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawPaths, (sta te, pathRange)); 96 DrawPaths* dp = GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawPaths, (sta te, pathRange));
97 dp->fIndices = savedIndices; 97 dp->fIndices = savedIndices;
98 dp->fIndexType = indexType; 98 dp->fIndexType = indexType;
99 dp->fTransforms = savedTransforms; 99 dp->fTransforms = savedTransforms;
100 dp->fTransformType = transformType; 100 dp->fTransformType = transformType;
101 dp->fCount = count; 101 dp->fCount = count;
102 dp->fStencilSettings = stencilSettings; 102 dp->fStencilSettings = stencilSettings;
103 return dp; 103 return dp;
104 } 104 }
OLDNEW
« no previous file with comments | « src/gpu/GrGpuResourceRef.cpp ('k') | src/gpu/GrLayerCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698