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

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

Issue 806653007: Fix up all the easy virtual ... SK_OVERRIDE cases. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 11 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
« no previous file with comments | « include/gpu/GrRenderTarget.h ('k') | include/gpu/SkGrPixelRef.h » ('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 /* 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
11 11
12 #include "GrSurface.h" 12 #include "GrSurface.h"
13 #include "SkPoint.h" 13 #include "SkPoint.h"
14 #include "SkRefCnt.h" 14 #include "SkRefCnt.h"
15 15
16 class GrResourceKey; 16 class GrResourceKey;
17 class GrTextureParams; 17 class GrTextureParams;
18 class GrTexturePriv; 18 class GrTexturePriv;
19 19
20 class GrTexture : virtual public GrSurface { 20 class GrTexture : virtual public GrSurface {
21 public: 21 public:
22 virtual GrTexture* asTexture() SK_OVERRIDE { return this; } 22 GrTexture* asTexture() SK_OVERRIDE { return this; }
23 virtual const GrTexture* asTexture() const SK_OVERRIDE { return this; } 23 const GrTexture* asTexture() const SK_OVERRIDE { return this; }
24 24
25 /** 25 /**
26 * Return the native ID or handle to the texture, depending on the 26 * Return the native ID or handle to the texture, depending on the
27 * platform. e.g. on OpenGL, return the texture ID. 27 * platform. e.g. on OpenGL, return the texture ID.
28 */ 28 */
29 virtual GrBackendObject getTextureHandle() const = 0; 29 virtual GrBackendObject getTextureHandle() const = 0;
30 30
31 /** 31 /**
32 * This function indicates that the texture parameters (wrap mode, filtering , ...) have been 32 * This function indicates that the texture parameters (wrap mode, filtering , ...) have been
33 * changed externally to Skia. 33 * changed externally to Skia.
(...skipping 10 matching lines...) Expand all
44 /** Access methods that are only to be used within Skia code. */ 44 /** Access methods that are only to be used within Skia code. */
45 inline GrTexturePriv texturePriv(); 45 inline GrTexturePriv texturePriv();
46 inline const GrTexturePriv texturePriv() const; 46 inline const GrTexturePriv texturePriv() const;
47 47
48 protected: 48 protected:
49 GrTexture(GrGpu* gpu, bool isWrapped, const GrSurfaceDesc& desc); 49 GrTexture(GrGpu* gpu, bool isWrapped, const GrSurfaceDesc& desc);
50 50
51 void validateDesc() const; 51 void validateDesc() const;
52 52
53 private: 53 private:
54 virtual size_t onGpuMemorySize() const SK_OVERRIDE; 54 size_t onGpuMemorySize() const SK_OVERRIDE;
55 void dirtyMipMaps(bool mipMapsDirty); 55 void dirtyMipMaps(bool mipMapsDirty);
56 56
57 enum MipMapsStatus { 57 enum MipMapsStatus {
58 kNotAllocated_MipMapsStatus, 58 kNotAllocated_MipMapsStatus,
59 kAllocated_MipMapsStatus, 59 kAllocated_MipMapsStatus,
60 kValid_MipMapsStatus 60 kValid_MipMapsStatus
61 }; 61 };
62 62
63 MipMapsStatus fMipMapsStatus; 63 MipMapsStatus fMipMapsStatus;
64 // These two shift a fixed-point value into normalized coordinates 64 // These two shift a fixed-point value into normalized coordinates
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 fTexture.reset(SkSafeRef(texture)); 104 fTexture.reset(SkSafeRef(texture));
105 return texture; 105 return texture;
106 } 106 }
107 107
108 private: 108 private:
109 SkAutoTUnref<GrTexture> fTexture; 109 SkAutoTUnref<GrTexture> fTexture;
110 SkIPoint fOffset; 110 SkIPoint fOffset;
111 }; 111 };
112 112
113 #endif 113 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrRenderTarget.h ('k') | include/gpu/SkGrPixelRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698