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

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

Issue 1261033002: Rename GrInOrderDrawBuffer to GrBufferedDrawTarget (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 unified diff | Download patch
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"
11
10 #include "GrColor.h" 12 #include "GrColor.h"
11 #include "GrInOrderDrawBuffer.h"
12 #include "SkPoint.h" 13 #include "SkPoint.h"
13 14
14 static bool path_fill_type_is_winding(const GrStencilSettings& pathStencilSettin gs) { 15 static bool path_fill_type_is_winding(const GrStencilSettings& pathStencilSettin gs) {
15 static const GrStencilSettings::Face pathFace = GrStencilSettings::kFront_Fa ce; 16 static const GrStencilSettings::Face pathFace = GrStencilSettings::kFront_Fa ce;
16 bool isWinding = kInvert_StencilOp != pathStencilSettings.passOp(pathFace); 17 bool isWinding = kInvert_StencilOp != pathStencilSettings.passOp(pathFace);
17 if (isWinding) { 18 if (isWinding) {
18 // Double check that it is in fact winding. 19 // Double check that it is in fact winding.
19 SkASSERT(kIncClamp_StencilOp == pathStencilSettings.passOp(pathFace)); 20 SkASSERT(kIncClamp_StencilOp == pathStencilSettings.passOp(pathFace));
20 SkASSERT(kIncClamp_StencilOp == pathStencilSettings.failOp(pathFace)); 21 SkASSERT(kIncClamp_StencilOp == pathStencilSettings.failOp(pathFace));
21 SkASSERT(0x1 != pathStencilSettings.writeMask(pathFace)); 22 SkASSERT(0x1 != pathStencilSettings.writeMask(pathFace));
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 const GrPathProcessor* pathProc, 61 const GrPathProcessor* pathProc,
61 const GrPath* path, 62 const GrPath* path,
62 const GrStencilSettings& stencilSettings ) { 63 const GrStencilSettings& stencilSettings ) {
63 DrawPath* dp = GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawPath, (state , path)); 64 DrawPath* dp = GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawPath, (state , path));
64 dp->fStencilSettings = stencilSettings; 65 dp->fStencilSettings = stencilSettings;
65 return dp; 66 return dp;
66 } 67 }
67 68
68 GrTargetCommands::Cmd* 69 GrTargetCommands::Cmd*
69 GrInOrderCommandBuilder::recordDrawPaths(State* state, 70 GrInOrderCommandBuilder::recordDrawPaths(State* state,
70 GrInOrderDrawBuffer* iodb, 71 GrBufferedDrawTarget* iodb,
71 const GrPathProcessor* pathProc, 72 const GrPathProcessor* pathProc,
72 const GrPathRange* pathRange, 73 const GrPathRange* pathRange,
73 const void* indexValues, 74 const void* indexValues,
74 GrDrawTarget::PathIndexType indexType, 75 GrDrawTarget::PathIndexType indexType,
75 const float transformValues[], 76 const float transformValues[],
76 GrDrawTarget::PathTransformType transfo rmType, 77 GrDrawTarget::PathTransformType transfo rmType,
77 int count, 78 int count,
78 const GrStencilSettings& stencilSetting s, 79 const GrStencilSettings& stencilSetting s,
79 const GrDrawTarget::PipelineInfo& pipel ineInfo) { 80 const GrDrawTarget::PipelineInfo& pipel ineInfo) {
80 SkASSERT(pathRange); 81 SkASSERT(pathRange);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 120
120 DrawPaths* dp = GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawPaths, (sta te, pathRange)); 121 DrawPaths* dp = GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawPaths, (sta te, pathRange));
121 dp->fIndices = savedIndices; 122 dp->fIndices = savedIndices;
122 dp->fIndexType = indexType; 123 dp->fIndexType = indexType;
123 dp->fTransforms = savedTransforms; 124 dp->fTransforms = savedTransforms;
124 dp->fTransformType = transformType; 125 dp->fTransformType = transformType;
125 dp->fCount = count; 126 dp->fCount = count;
126 dp->fStencilSettings = stencilSettings; 127 dp->fStencilSettings = stencilSettings;
127 return dp; 128 return dp;
128 } 129 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698