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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 int vertexCount, | 594 int vertexCount, |
595 int indexCount); | 595 int indexCount); |
596 AutoReleaseGeometry(); | 596 AutoReleaseGeometry(); |
597 ~AutoReleaseGeometry(); | 597 ~AutoReleaseGeometry(); |
598 bool set(GrDrawTarget* target, | 598 bool set(GrDrawTarget* target, |
599 int vertexCount, | 599 int vertexCount, |
600 int indexCount); | 600 int indexCount); |
601 bool succeeded() const { return NULL != fTarget; } | 601 bool succeeded() const { return NULL != fTarget; } |
602 void* vertices() const { SkASSERT(this->succeeded()); return fVertices;
} | 602 void* vertices() const { SkASSERT(this->succeeded()); return fVertices;
} |
603 void* indices() const { SkASSERT(this->succeeded()); return fIndices; } | 603 void* indices() const { SkASSERT(this->succeeded()); return fIndices; } |
604 GrPoint* positions() const { | 604 SkPoint* positions() const { |
605 return static_cast<GrPoint*>(this->vertices()); | 605 return static_cast<SkPoint*>(this->vertices()); |
606 } | 606 } |
607 | 607 |
608 private: | 608 private: |
609 void reset(); | 609 void reset(); |
610 | 610 |
611 GrDrawTarget* fTarget; | 611 GrDrawTarget* fTarget; |
612 void* fVertices; | 612 void* fVertices; |
613 void* fIndices; | 613 void* fIndices; |
614 }; | 614 }; |
615 | 615 |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
934 // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTar
get. | 934 // The context owns us, not vice-versa, so this ptr is not ref'ed by DrawTar
get. |
935 GrContext* fContext; | 935 GrContext* fContext; |
936 // To keep track that we always have at least as many debug marker adds as r
emoves | 936 // To keep track that we always have at least as many debug marker adds as r
emoves |
937 int fGpuTraceMar
kerCount; | 937 int fGpuTraceMar
kerCount; |
938 GrTraceMarkerSet fActiveTrace
Markers; | 938 GrTraceMarkerSet fActiveTrace
Markers; |
939 | 939 |
940 typedef SkRefCnt INHERITED; | 940 typedef SkRefCnt INHERITED; |
941 }; | 941 }; |
942 | 942 |
943 #endif | 943 #endif |
OLD | NEW |