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

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

Issue 1249543003: Creating functions for uploading a mipmapped texture. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Removing the concept of a dirty mipmap. It is expected that the texture upload provides the mipmaps. Created 5 years, 3 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
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 inline GrTexturePriv texturePriv(); 44 inline GrTexturePriv texturePriv();
45 inline const GrTexturePriv texturePriv() const; 45 inline const GrTexturePriv texturePriv() const;
46 46
47 protected: 47 protected:
48 GrTexture(GrGpu*, LifeCycle, const GrSurfaceDesc&); 48 GrTexture(GrGpu*, LifeCycle, const GrSurfaceDesc&);
49 49
50 void validateDesc() const; 50 void validateDesc() const;
51 51
52 private: 52 private:
53 size_t onGpuMemorySize() const override; 53 size_t onGpuMemorySize() const override;
54 void dirtyMipMaps(bool mipMapsDirty);
bsalomon 2015/09/15 13:14:10 What happens if we draw to the base of a texture t
cblume 2015/09/16 18:40:46 You are right. Last night, while writing this, I t
55 54
56 enum MipMapsStatus { 55 enum MipMapsStatus {
57 kNotAllocated_MipMapsStatus, 56 kNotAllocated_MipMapsStatus,
58 kAllocated_MipMapsStatus, 57 kAllocated_MipMapsStatus
59 kValid_MipMapsStatus
60 }; 58 };
61 59
62 MipMapsStatus fMipMapsStatus; 60 MipMapsStatus fMipMapsStatus;
63 // These two shift a fixed-point value into normalized coordinates» 61 // These two shift a fixed-point value into normalized coordinates
64 // for this texture if the texture is power of two sized. 62 // for this texture if the texture is power of two sized.
65 int fShiftFixedX; 63 int fShiftFixedX;
66 int fShiftFixedY; 64 int fShiftFixedY;
67 65
68 friend class GrTexturePriv; 66 friend class GrTexturePriv;
69 67
70 typedef GrSurface INHERITED; 68 typedef GrSurface INHERITED;
71 }; 69 };
72 70
73 #endif 71 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698