Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: src/gpu/GrDrawTarget.h

Issue 251013002: Split GrResource into GrCacheable/GrGpuObject (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 735
736 int indexCountInCurrentSource() const { 736 int indexCountInCurrentSource() const {
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->gpuMemorySize() / size of(uint16_t));
746 default: 746 default:
747 SkFAIL("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.
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698