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

Side by Side Diff: src/gpu/gl/GrGpuGL_program.cpp

Issue 22686002: Implement path cover with nv_path_rendering (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebased to issue 23537028 Created 7 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 | Annotate | Revision Log
« src/gpu/gl/GrGpuGL.cpp ('K') | « src/gpu/gl/GrGpuGL.cpp ('k') | no next file » | 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 2011 Google Inc. 2 * Copyright 2011 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 "GrGpuGL.h" 8 #include "GrGpuGL.h"
9 9
10 #include "GrEffect.h" 10 #include "GrEffect.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 //////////////////////////////////////////////////////////////////////////////// 201 ////////////////////////////////////////////////////////////////////////////////
202 202
203 #define GL_CALL(X) GR_GL_CALL(this->glInterface(), X) 203 #define GL_CALL(X) GR_GL_CALL(this->glInterface(), X)
204 204
205 bool GrGpuGL::flushGraphicsState(DrawType type, const GrDeviceCoordTexture* dstC opy) { 205 bool GrGpuGL::flushGraphicsState(DrawType type, const GrDeviceCoordTexture* dstC opy) {
206 const GrDrawState& drawState = this->getDrawState(); 206 const GrDrawState& drawState = this->getDrawState();
207 207
208 // GrGpu::setupClipAndFlushState should have already checked this and bailed if not true. 208 // GrGpu::setupClipAndFlushState should have already checked this and bailed if not true.
209 SkASSERT(NULL != drawState.getRenderTarget()); 209 SkASSERT(NULL != drawState.getRenderTarget());
210 210
211 if (kStencilPath_DrawType == type) { 211 if (kStencilPath_DrawType == type || kDrawPath_DrawType == type) {
212 const GrRenderTarget* rt = this->getDrawState().getRenderTarget(); 212 const GrRenderTarget* rt = this->getDrawState().getRenderTarget();
213 SkISize size; 213 SkISize size;
214 size.set(rt->width(), rt->height()); 214 size.set(rt->width(), rt->height());
215 this->setProjectionMatrix(drawState.getViewMatrix(), size, rt->origin()) ; 215 this->setProjectionMatrix(drawState.getViewMatrix(), size, rt->origin()) ;
216 } else { 216 }
217
218 if (kStencilPath_DrawType != type) {
Chris Dalton 2013/09/13 19:49:58 Kimmo, we should be able to leave this function as
Kimmo Kinnunen 2013/09/18 07:52:38 But sometimes gpu draw path is selected when the p
Chris Dalton 2013/09/23 02:05:59 When does it use kDrawPath_DrawType with a vertex
bsalomon 2013/10/08 14:05:08 agreed.
217 this->flushMiscFixedFunctionState(); 219 this->flushMiscFixedFunctionState();
218 220
219 GrBlendCoeff srcCoeff; 221 GrBlendCoeff srcCoeff;
220 GrBlendCoeff dstCoeff; 222 GrBlendCoeff dstCoeff;
221 GrDrawState::BlendOptFlags blendOpts = drawState.getBlendOpts(false, &sr cCoeff, &dstCoeff); 223 GrDrawState::BlendOptFlags blendOpts = drawState.getBlendOpts(false, &sr cCoeff, &dstCoeff);
222 if (GrDrawState::kSkipDraw_BlendOptFlag & blendOpts) { 224 if (GrDrawState::kSkipDraw_BlendOptFlag & blendOpts) {
223 return false; 225 return false;
224 } 226 }
225 227
226 SkSTArray<8, const GrEffectStage*, true> colorStages; 228 SkSTArray<8, const GrEffectStage*, true> colorStages;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 GrGLAttribTypeToLayout(attribType).fType, 365 GrGLAttribTypeToLayout(attribType).fType,
364 GrGLAttribTypeToLayout(attribType).fNormalized, 366 GrGLAttribTypeToLayout(attribType).fNormalized,
365 stride, 367 stride,
366 reinterpret_cast<GrGLvoid*>( 368 reinterpret_cast<GrGLvoid*>(
367 vertexOffsetInBytes + vertexAttrib->fOffset)); 369 vertexOffsetInBytes + vertexAttrib->fOffset));
368 } 370 }
369 371
370 attribState->disableUnusedArrays(this, usedAttribArraysMask, false); 372 attribState->disableUnusedArrays(this, usedAttribArraysMask, false);
371 } 373 }
372 } 374 }
OLDNEW
« src/gpu/gl/GrGpuGL.cpp ('K') | « src/gpu/gl/GrGpuGL.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698