| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #ifndef GrGpu_DEFINED | 10 #ifndef GrGpu_DEFINED |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 case kLines_GrPrimitiveType: | 358 case kLines_GrPrimitiveType: |
| 359 case kLineStrip_GrPrimitiveType: | 359 case kLineStrip_GrPrimitiveType: |
| 360 return kDrawLines_DrawType; | 360 return kDrawLines_DrawType; |
| 361 default: | 361 default: |
| 362 GrCrash("Unexpected primitive type"); | 362 GrCrash("Unexpected primitive type"); |
| 363 return kDrawTriangles_DrawType; | 363 return kDrawTriangles_DrawType; |
| 364 } | 364 } |
| 365 } | 365 } |
| 366 | 366 |
| 367 // prepares clip flushes gpu state before a draw | 367 // prepares clip flushes gpu state before a draw |
| 368 bool setupClipAndFlushState(DrawType, const GrDeviceCoordTexture* dstCopy); | 368 bool setupClipAndFlushState(DrawType, |
| 369 const GrDeviceCoordTexture* dstCopy, |
| 370 GrDrawState::AutoRestoreEffects* are); |
| 369 | 371 |
| 370 // Functions used to map clip-respecting stencil tests into normal | 372 // Functions used to map clip-respecting stencil tests into normal |
| 371 // stencil funcs supported by GPUs. | 373 // stencil funcs supported by GPUs. |
| 372 static GrStencilFunc ConvertStencilFunc(bool stencilInClip, | 374 static GrStencilFunc ConvertStencilFunc(bool stencilInClip, |
| 373 GrStencilFunc func); | 375 GrStencilFunc func); |
| 374 static void ConvertStencilFuncAndMask(GrStencilFunc func, | 376 static void ConvertStencilFuncAndMask(GrStencilFunc func, |
| 375 bool clipInStencil, | 377 bool clipInStencil, |
| 376 unsigned int clipBit, | 378 unsigned int clipBit, |
| 377 unsigned int userBits, | 379 unsigned int userBits, |
| 378 unsigned int* ref, | 380 unsigned int* ref, |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 mutable GrIndexBuffer* fQuadInd
exBuffer; | 533 mutable GrIndexBuffer* fQuadInd
exBuffer; |
| 532 bool fContext
IsDirty; | 534 bool fContext
IsDirty; |
| 533 // Used to abandon/release all resources created by this GrGpu. TODO: Move t
his | 535 // Used to abandon/release all resources created by this GrGpu. TODO: Move t
his |
| 534 // functionality to GrResourceCache. | 536 // functionality to GrResourceCache. |
| 535 ResourceList fResourc
eList; | 537 ResourceList fResourc
eList; |
| 536 | 538 |
| 537 typedef GrDrawTarget INHERITED; | 539 typedef GrDrawTarget INHERITED; |
| 538 }; | 540 }; |
| 539 | 541 |
| 540 #endif | 542 #endif |
| OLD | NEW |