OLD | NEW |
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 /** Access methods that are only to be used within Skia code. */ | 52 /** Access methods that are only to be used within Skia code. */ |
53 inline GrTexturePriv texturePriv(); | 53 inline GrTexturePriv texturePriv(); |
54 inline const GrTexturePriv texturePriv() const; | 54 inline const GrTexturePriv texturePriv() const; |
55 | 55 |
56 protected: | 56 protected: |
57 // A texture refs its rt representation but not vice-versa. It is up to | 57 // A texture refs its rt representation but not vice-versa. It is up to |
58 // the subclass constructor to initialize this pointer. | 58 // the subclass constructor to initialize this pointer. |
59 SkAutoTUnref<GrRenderTarget> fRenderTarget; | 59 SkAutoTUnref<GrRenderTarget> fRenderTarget; |
60 | 60 |
61 GrTexture(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc); | 61 GrTexture(GrGpu* gpu, bool isWrapped, const GrSurfaceDesc& desc); |
62 | 62 |
63 virtual ~GrTexture(); | 63 virtual ~GrTexture(); |
64 | 64 |
65 // GrResource overrides | 65 // GrResource overrides |
66 virtual void onRelease() SK_OVERRIDE; | 66 virtual void onRelease() SK_OVERRIDE; |
67 virtual void onAbandon() SK_OVERRIDE; | 67 virtual void onAbandon() SK_OVERRIDE; |
68 | 68 |
69 void validateDesc() const; | 69 void validateDesc() const; |
70 | 70 |
71 private: | 71 private: |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 fTexture.reset(SkSafeRef(texture)); | 121 fTexture.reset(SkSafeRef(texture)); |
122 return texture; | 122 return texture; |
123 } | 123 } |
124 | 124 |
125 private: | 125 private: |
126 SkAutoTUnref<GrTexture> fTexture; | 126 SkAutoTUnref<GrTexture> fTexture; |
127 SkIPoint fOffset; | 127 SkIPoint fOffset; |
128 }; | 128 }; |
129 | 129 |
130 #endif | 130 #endif |
OLD | NEW |