OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |