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

Side by Side Diff: src/gpu/gl/GrGLTexture.h

Issue 1249543003: Creating functions for uploading a mipmapped texture. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Refactoring the mipmap level count out. Cleaning includes. Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 8
9 #ifndef GrGLTexture_DEFINED 9 #ifndef GrGLTexture_DEFINED
10 #define GrGLTexture_DEFINED 10 #define GrGLTexture_DEFINED
(...skipping 15 matching lines...) Expand all
26 GrGLenum fSwizzleRGBA[4]; 26 GrGLenum fSwizzleRGBA[4];
27 void invalidate() { memset(this, 0xff, sizeof(TexParams)); } 27 void invalidate() { memset(this, 0xff, sizeof(TexParams)); }
28 }; 28 };
29 29
30 struct IDDesc { 30 struct IDDesc {
31 GrGLTextureInfo fInfo; 31 GrGLTextureInfo fInfo;
32 GrGpuResource::LifeCycle fLifeCycle; 32 GrGpuResource::LifeCycle fLifeCycle;
33 }; 33 };
34 34
35 GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&); 35 GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&);
36 GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&, bool wasMipMapDat aProvided);
36 37
37 GrBackendObject getTextureHandle() const override; 38 GrBackendObject getTextureHandle() const override;
38 39
39 void textureParamsModified() override { fTexParams.invalidate(); } 40 void textureParamsModified() override { fTexParams.invalidate(); }
40 41
41 // These functions are used to track the texture parameters associated with the texture. 42 // These functions are used to track the texture parameters associated with the texture.
42 const TexParams& getCachedTexParams(GrGpu::ResetTimestamp* timestamp) const { 43 const TexParams& getCachedTexParams(GrGpu::ResetTimestamp* timestamp) const {
43 *timestamp = fTexParamsTimestamp; 44 *timestamp = fTexParamsTimestamp;
44 return fTexParams; 45 return fTexParams;
45 } 46 }
(...skipping 30 matching lines...) Expand all
76 GrGLTextureInfo fInfo; 77 GrGLTextureInfo fInfo;
77 78
78 // We track this separately from GrGpuResource because this may be both a te xture and a render 79 // We track this separately from GrGpuResource because this may be both a te xture and a render
79 // target, and the texture may be wrapped while the render target is not. 80 // target, and the texture may be wrapped while the render target is not.
80 LifeCycle fTextureIDLifecycle; 81 LifeCycle fTextureIDLifecycle;
81 82
82 typedef GrTexture INHERITED; 83 typedef GrTexture INHERITED;
83 }; 84 };
84 85
85 #endif 86 #endif
OLDNEW
« src/gpu/gl/GrGLGpu.cpp ('K') | « src/gpu/gl/GrGLGpu.cpp ('k') | src/gpu/gl/GrGLTexture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698