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

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

Issue 326383003: Allow compressed texture data to be updated. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add Asserts Created 6 years, 6 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 | « no previous file | src/gpu/gl/GrGpuGL.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 GrGpuGL_DEFINED 8 #ifndef GrGpuGL_DEFINED
9 #define GrGpuGL_DEFINED 9 #define GrGpuGL_DEFINED
10 10
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 GrGLenum* externalFormat, 267 GrGLenum* externalFormat,
268 GrGLenum* externalType); 268 GrGLenum* externalType);
269 // helper for onCreateTexture and writeTexturePixels 269 // helper for onCreateTexture and writeTexturePixels
270 bool uploadTexData(const GrGLTexture::Desc& desc, 270 bool uploadTexData(const GrGLTexture::Desc& desc,
271 bool isNewTexture, 271 bool isNewTexture,
272 int left, int top, int width, int height, 272 int left, int top, int width, int height,
273 GrPixelConfig dataConfig, 273 GrPixelConfig dataConfig,
274 const void* data, 274 const void* data,
275 size_t rowBytes); 275 size_t rowBytes);
276 276
277 // helper for onCreateCompressedTexture 277 // helper for onCreateCompressedTexture. If width and height are
278 // set to -1, then this function will use desc.fWidth and desc.fHeight
279 // for the size of the data. The isNewTexture flag should be set to true
280 // whenever a new texture needs to be created. Otherwise, we assume that
281 // the texture is already in GPU memory and that it's going to be updated
282 // with new data.
278 bool uploadCompressedTexData(const GrGLTexture::Desc& desc, 283 bool uploadCompressedTexData(const GrGLTexture::Desc& desc,
279 const void* data); 284 const void* data,
285 bool isNewTexture = true,
286 int left = 0, int top = 0,
287 int width = -1, int height = -1);
280 288
281 bool createRenderTargetObjects(int width, int height, 289 bool createRenderTargetObjects(int width, int height,
282 GrGLuint texID, 290 GrGLuint texID,
283 GrGLRenderTarget::Desc* desc); 291 GrGLRenderTarget::Desc* desc);
284 292
285 GrGLContext fGLContext; 293 GrGLContext fGLContext;
286 294
287 // GL program-related state 295 // GL program-related state
288 ProgramCache* fProgramCache; 296 ProgramCache* fProgramCache;
289 SkAutoTUnref<GrGLProgram> fCurrentProgram; 297 SkAutoTUnref<GrGLProgram> fCurrentProgram;
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 // we record what stencil format worked last time to hopefully exit early 479 // we record what stencil format worked last time to hopefully exit early
472 // from our loop that tries stencil formats and calls check fb status. 480 // from our loop that tries stencil formats and calls check fb status.
473 int fLastSuccessfulStencilFmtIdx; 481 int fLastSuccessfulStencilFmtIdx;
474 482
475 SkAutoTDelete<GrGLNameAllocator> fPathNameAllocator; 483 SkAutoTDelete<GrGLNameAllocator> fPathNameAllocator;
476 484
477 typedef GrGpu INHERITED; 485 typedef GrGpu INHERITED;
478 }; 486 };
479 487
480 #endif 488 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGpuGL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698