| 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 return kDrawLines_DrawType; | 352 return kDrawLines_DrawType; |
| 353 default: | 353 default: |
| 354 GrCrash("Unexpected primitive type"); | 354 GrCrash("Unexpected primitive type"); |
| 355 return kDrawTriangles_DrawType; | 355 return kDrawTriangles_DrawType; |
| 356 } | 356 } |
| 357 } | 357 } |
| 358 | 358 |
| 359 // prepares clip flushes gpu state before a draw | 359 // prepares clip flushes gpu state before a draw |
| 360 bool setupClipAndFlushState(DrawType, | 360 bool setupClipAndFlushState(DrawType, |
| 361 const GrDeviceCoordTexture* dstCopy, | 361 const GrDeviceCoordTexture* dstCopy, |
| 362 GrDrawState::AutoRestoreEffects* are); | 362 GrDrawState::AutoRestoreEffects* are, |
| 363 const SkRect* devBounds); |
| 363 | 364 |
| 364 // Functions used to map clip-respecting stencil tests into normal | 365 // Functions used to map clip-respecting stencil tests into normal |
| 365 // stencil funcs supported by GPUs. | 366 // stencil funcs supported by GPUs. |
| 366 static GrStencilFunc ConvertStencilFunc(bool stencilInClip, | 367 static GrStencilFunc ConvertStencilFunc(bool stencilInClip, |
| 367 GrStencilFunc func); | 368 GrStencilFunc func); |
| 368 static void ConvertStencilFuncAndMask(GrStencilFunc func, | 369 static void ConvertStencilFuncAndMask(GrStencilFunc func, |
| 369 bool clipInStencil, | 370 bool clipInStencil, |
| 370 unsigned int clipBit, | 371 unsigned int clipBit, |
| 371 unsigned int userBits, | 372 unsigned int userBits, |
| 372 unsigned int* ref, | 373 unsigned int* ref, |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 // these are mutable so they can be created on-demand | 519 // these are mutable so they can be created on-demand |
| 519 mutable GrIndexBuffer* fQuadInd
exBuffer; | 520 mutable GrIndexBuffer* fQuadInd
exBuffer; |
| 520 // Used to abandon/release all resources created by this GrGpu. TODO: Move t
his | 521 // Used to abandon/release all resources created by this GrGpu. TODO: Move t
his |
| 521 // functionality to GrResourceCache. | 522 // functionality to GrResourceCache. |
| 522 ResourceList fResourc
eList; | 523 ResourceList fResourc
eList; |
| 523 | 524 |
| 524 typedef GrDrawTarget INHERITED; | 525 typedef GrDrawTarget INHERITED; |
| 525 }; | 526 }; |
| 526 | 527 |
| 527 #endif | 528 #endif |
| OLD | NEW |