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

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

Issue 846303002: Make uncached textures uncached from the get go. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add comment 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 | « src/gpu/gl/GrGLBufferImpl.cpp ('k') | src/gpu/gl/GrGLGpu.cpp » ('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 * 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 #ifndef GrGLGpu_DEFINED 8 #ifndef GrGLGpu_DEFINED
9 #define GrGLGpu_DEFINED 9 #define GrGLGpu_DEFINED
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 protected: 107 protected:
108 void buildProgramDesc(const GrOptDrawState&, 108 void buildProgramDesc(const GrOptDrawState&,
109 const GrProgramDesc::DescInfo&, 109 const GrProgramDesc::DescInfo&,
110 GrGpu::DrawType, 110 GrGpu::DrawType,
111 GrProgramDesc*) SK_OVERRIDE; 111 GrProgramDesc*) SK_OVERRIDE;
112 112
113 private: 113 private:
114 // GrGpu overrides 114 // GrGpu overrides
115 void onResetContext(uint32_t resetBits) SK_OVERRIDE; 115 void onResetContext(uint32_t resetBits) SK_OVERRIDE;
116 116
117 GrTexture* onCreateTexture(const GrSurfaceDesc& desc, 117 GrTexture* onCreateTexture(const GrSurfaceDesc& desc, bool budgeted, const v oid* srcData,
118 const void* srcData,
119 size_t rowBytes) SK_OVERRIDE; 118 size_t rowBytes) SK_OVERRIDE;
120 GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, 119 GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, bool budgete d,
121 const void* srcData) SK_OVERRIDE; 120 const void* srcData) SK_OVERRIDE;
122 GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) SK_OVERRIDE; 121 GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) SK_OVERRIDE;
123 GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) SK_OVERRIDE; 122 GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) SK_OVERRIDE;
124 GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) SK_OVERRIDE; 123 GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) SK_OVERRIDE;
125 GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&) SK_OVERRIDE; 124 GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&) SK_OVERRIDE;
126 bool createStencilBufferForRenderTarget(GrRenderTarget* rt, 125 bool createStencilBufferForRenderTarget(GrRenderTarget* rt,
127 int width, int height) SK_OVERRIDE; 126 int width, int height) SK_OVERRIDE;
128 bool attachStencilBufferToRenderTarget(GrStencilBuffer* sb, GrRenderTarget* rt) SK_OVERRIDE; 127 bool attachStencilBufferToRenderTarget(GrStencilBuffer* sb, GrRenderTarget* rt) SK_OVERRIDE;
129 128
130 void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color, 129 void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color,
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 // for the size of the data. The isNewTexture flag should be set to true 270 // for the size of the data. The isNewTexture flag should be set to true
272 // whenever a new texture needs to be created. Otherwise, we assume that 271 // whenever a new texture needs to be created. Otherwise, we assume that
273 // the texture is already in GPU memory and that it's going to be updated 272 // the texture is already in GPU memory and that it's going to be updated
274 // with new data. 273 // with new data.
275 bool uploadCompressedTexData(const GrSurfaceDesc& desc, 274 bool uploadCompressedTexData(const GrSurfaceDesc& desc,
276 const void* data, 275 const void* data,
277 bool isNewTexture = true, 276 bool isNewTexture = true,
278 int left = 0, int top = 0, 277 int left = 0, int top = 0,
279 int width = -1, int height = -1); 278 int width = -1, int height = -1);
280 279
281 bool createRenderTargetObjects(const GrSurfaceDesc&, GrGLuint texID, GrGLRen derTarget::IDDesc*); 280 bool createRenderTargetObjects(const GrSurfaceDesc&, bool budgeted, GrGLuint texID,
281 GrGLRenderTarget::IDDesc*);
282 282
283 GrGLuint bindSurfaceAsFBO(GrSurface* surface, GrGLenum fboTarget, GrGLIRect* viewport); 283 GrGLuint bindSurfaceAsFBO(GrSurface* surface, GrGLenum fboTarget, GrGLIRect* viewport);
284 284
285 GrGLContext fGLContext; 285 GrGLContext fGLContext;
286 286
287 // GL program-related state 287 // GL program-related state
288 ProgramCache* fProgramCache; 288 ProgramCache* fProgramCache;
289 SkAutoTUnref<GrGLProgram> fCurrentProgram; 289 SkAutoTUnref<GrGLProgram> fCurrentProgram;
290 290
291 /////////////////////////////////////////////////////////////////////////// 291 ///////////////////////////////////////////////////////////////////////////
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 451
452 // we record what stencil format worked last time to hopefully exit early 452 // we record what stencil format worked last time to hopefully exit early
453 // from our loop that tries stencil formats and calls check fb status. 453 // from our loop that tries stencil formats and calls check fb status.
454 int fLastSuccessfulStencilFmtIdx; 454 int fLastSuccessfulStencilFmtIdx;
455 455
456 typedef GrGpu INHERITED; 456 typedef GrGpu INHERITED;
457 friend class GrGLPathRendering; // For accessing setTextureUnit. 457 friend class GrGLPathRendering; // For accessing setTextureUnit.
458 }; 458 };
459 459
460 #endif 460 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLBufferImpl.cpp ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698