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

Side by Side Diff: src/gpu/GrGpu.h

Issue 212753002: Use fixed function pipeline only when drawing paths (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 8 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 | « include/gpu/gl/GrGLInterface.h ('k') | src/gpu/gl/GrGLCaps.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 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 #ifndef GrGpu_DEFINED 8 #ifndef GrGpu_DEFINED
9 #define GrGpu_DEFINED 9 #define GrGpu_DEFINED
10 10
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 enum PrivateDrawStateStateBits { 316 enum PrivateDrawStateStateBits {
317 kFirstBit = (GrDrawState::kLastPublicStateBit << 1), 317 kFirstBit = (GrDrawState::kLastPublicStateBit << 1),
318 318
319 kModifyStencilClip_StateBit = kFirstBit, // allows draws to modify 319 kModifyStencilClip_StateBit = kFirstBit, // allows draws to modify
320 // stencil bits used for 320 // stencil bits used for
321 // clipping. 321 // clipping.
322 }; 322 };
323 323
324 void getPathStencilSettingsForFillType(SkPath::FillType fill, GrStencilSetti ngs* outStencilSettings); 324 void getPathStencilSettingsForFillType(SkPath::FillType fill, GrStencilSetti ngs* outStencilSettings);
325 325
326 protected:
327 enum DrawType { 326 enum DrawType {
328 kDrawPoints_DrawType, 327 kDrawPoints_DrawType,
329 kDrawLines_DrawType, 328 kDrawLines_DrawType,
330 kDrawTriangles_DrawType, 329 kDrawTriangles_DrawType,
331 kStencilPath_DrawType, 330 kStencilPath_DrawType,
332 kDrawPath_DrawType, 331 kDrawPath_DrawType,
333 kDrawPaths_DrawType, 332 kDrawPaths_DrawType,
334 }; 333 };
335 334
335 protected:
336 DrawType PrimTypeToDrawType(GrPrimitiveType type) { 336 DrawType PrimTypeToDrawType(GrPrimitiveType type) {
337 switch (type) { 337 switch (type) {
338 case kTriangles_GrPrimitiveType: 338 case kTriangles_GrPrimitiveType:
339 case kTriangleStrip_GrPrimitiveType: 339 case kTriangleStrip_GrPrimitiveType:
340 case kTriangleFan_GrPrimitiveType: 340 case kTriangleFan_GrPrimitiveType:
341 return kDrawTriangles_DrawType; 341 return kDrawTriangles_DrawType;
342 case kPoints_GrPrimitiveType: 342 case kPoints_GrPrimitiveType:
343 return kDrawPoints_DrawType; 343 return kDrawPoints_DrawType;
344 case kLines_GrPrimitiveType: 344 case kLines_GrPrimitiveType:
345 case kLineStrip_GrPrimitiveType: 345 case kLineStrip_GrPrimitiveType:
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 // these are mutable so they can be created on-demand 515 // these are mutable so they can be created on-demand
516 mutable GrIndexBuffer* fQuadInd exBuffer; 516 mutable GrIndexBuffer* fQuadInd exBuffer;
517 // Used to abandon/release all resources created by this GrGpu. TODO: Move t his 517 // Used to abandon/release all resources created by this GrGpu. TODO: Move t his
518 // functionality to GrResourceCache. 518 // functionality to GrResourceCache.
519 ResourceList fResourc eList; 519 ResourceList fResourc eList;
520 520
521 typedef GrDrawTarget INHERITED; 521 typedef GrDrawTarget INHERITED;
522 }; 522 };
523 523
524 #endif 524 #endif
OLDNEW
« no previous file with comments | « include/gpu/gl/GrGLInterface.h ('k') | src/gpu/gl/GrGLCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698