| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 GrDrawTarget_DEFINED | 8 #ifndef GrDrawTarget_DEFINED |
| 9 #define GrDrawTarget_DEFINED | 9 #define GrDrawTarget_DEFINED |
| 10 | 10 |
| (...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 const GeometrySrcState& src = this->getGeomSrc(); | 737 const GeometrySrcState& src = this->getGeomSrc(); |
| 738 switch (src.fIndexSrc) { | 738 switch (src.fIndexSrc) { |
| 739 case kNone_GeometrySrcType: | 739 case kNone_GeometrySrcType: |
| 740 return 0; | 740 return 0; |
| 741 case kReserved_GeometrySrcType: | 741 case kReserved_GeometrySrcType: |
| 742 case kArray_GeometrySrcType: | 742 case kArray_GeometrySrcType: |
| 743 return src.fIndexCount; | 743 return src.fIndexCount; |
| 744 case kBuffer_GeometrySrcType: | 744 case kBuffer_GeometrySrcType: |
| 745 return static_cast<int>(src.fIndexBuffer->sizeInBytes() / sizeof
(uint16_t)); | 745 return static_cast<int>(src.fIndexBuffer->sizeInBytes() / sizeof
(uint16_t)); |
| 746 default: | 746 default: |
| 747 GrCrash("Unexpected Index Source."); | 747 SkFAIL("Unexpected Index Source."); |
| 748 return 0; | 748 return 0; |
| 749 } | 749 } |
| 750 } | 750 } |
| 751 | 751 |
| 752 // This method is called by copySurface The srcRect is guaranteed to be ent
irely within the | 752 // This method is called by copySurface The srcRect is guaranteed to be ent
irely within the |
| 753 // src bounds. Likewise, the dst rect implied by dstPoint and srcRect's widt
h and height falls | 753 // src bounds. Likewise, the dst rect implied by dstPoint and srcRect's widt
h and height falls |
| 754 // entirely within the dst. The default implementation will draw a rect from
the src to the | 754 // entirely within the dst. The default implementation will draw a rect from
the src to the |
| 755 // dst if the src is a texture and the dst is a render target and fail other
wise. | 755 // dst if the src is a texture and the dst is a render target and fail other
wise. |
| 756 virtual bool onCopySurface(GrSurface* dst, | 756 virtual bool onCopySurface(GrSurface* dst, |
| 757 GrSurface* src, | 757 GrSurface* src, |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTar
get. | 940 // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTar
get. |
| 941 GrContext* fContext; | 941 GrContext* fContext; |
| 942 // To keep track that we always have at least as many debug marker adds as r
emoves | 942 // To keep track that we always have at least as many debug marker adds as r
emoves |
| 943 int fGpuTraceMar
kerCount; | 943 int fGpuTraceMar
kerCount; |
| 944 GrTraceMarkerSet fActiveTrace
Markers; | 944 GrTraceMarkerSet fActiveTrace
Markers; |
| 945 | 945 |
| 946 typedef SkRefCnt INHERITED; | 946 typedef SkRefCnt INHERITED; |
| 947 }; | 947 }; |
| 948 | 948 |
| 949 #endif | 949 #endif |
| OLD | NEW |