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

Side by Side Diff: include/gpu/GrTexture.h

Issue 216503004: SK_SUPPORT_LEGACY_GRTYPES to hide duplicate types from SkTypes.h (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 8 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
OLDNEW
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 #ifndef GrTexture_DEFINED 9 #ifndef GrTexture_DEFINED
10 #define GrTexture_DEFINED 10 #define GrTexture_DEFINED
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 92 }
93 virtual const GrRenderTarget* asRenderTarget() const SK_OVERRIDE { 93 virtual const GrRenderTarget* asRenderTarget() const SK_OVERRIDE {
94 return fRenderTarget.get(); 94 return fRenderTarget.get();
95 } 95 }
96 96
97 // GrTexture 97 // GrTexture
98 /** 98 /**
99 * Convert from texels to normalized texture coords for POT textures 99 * Convert from texels to normalized texture coords for POT textures
100 * only. 100 * only.
101 */ 101 */
102 GrFixed normalizeFixedX(GrFixed x) const { 102 SkFixed normalizeFixedX(SkFixed x) const {
103 SkASSERT(GrIsPow2(fDesc.fWidth)); 103 SkASSERT(GrIsPow2(fDesc.fWidth));
104 return x >> fShiftFixedX; 104 return x >> fShiftFixedX;
105 } 105 }
106 GrFixed normalizeFixedY(GrFixed y) const { 106 SkFixed normalizeFixedY(SkFixed y) const {
107 SkASSERT(GrIsPow2(fDesc.fHeight)); 107 SkASSERT(GrIsPow2(fDesc.fHeight));
108 return y >> fShiftFixedY; 108 return y >> fShiftFixedY;
109 } 109 }
110 110
111 /** 111 /**
112 * Return the native ID or handle to the texture, depending on the 112 * Return the native ID or handle to the texture, depending on the
113 * platform. e.g. on OpenGL, return the texture ID. 113 * platform. e.g. on OpenGL, return the texture ID.
114 */ 114 */
115 virtual GrBackendObject getTextureHandle() const = 0; 115 virtual GrBackendObject getTextureHandle() const = 0;
116 116
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 GrTexture* setTexture(GrTexture* texture) { 203 GrTexture* setTexture(GrTexture* texture) {
204 fTexture.reset(SkSafeRef(texture)); 204 fTexture.reset(SkSafeRef(texture));
205 return texture; 205 return texture;
206 } 206 }
207 private: 207 private:
208 SkAutoTUnref<GrTexture> fTexture; 208 SkAutoTUnref<GrTexture> fTexture;
209 SkIPoint fOffset; 209 SkIPoint fOffset;
210 }; 210 };
211 211
212 #endif 212 #endif
OLDNEW
« include/gpu/GrPoint.h ('K') | « include/gpu/GrPoint.h ('k') | include/gpu/GrTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698