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

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

Issue 691523002: Separate out GrSurfaceConfig's fields from other structs used to create GrGL* GrSurface subclasses (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix indent Created 6 years, 1 month 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/GrGLTexture.cpp ('k') | 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 249
250 void flushStencil(const GrStencilSettings&, DrawType); 250 void flushStencil(const GrStencilSettings&, DrawType);
251 void flushAAState(const GrOptDrawState&, DrawType); 251 void flushAAState(const GrOptDrawState&, DrawType);
252 252
253 bool configToGLFormats(GrPixelConfig config, 253 bool configToGLFormats(GrPixelConfig config,
254 bool getSizedInternal, 254 bool getSizedInternal,
255 GrGLenum* internalFormat, 255 GrGLenum* internalFormat,
256 GrGLenum* externalFormat, 256 GrGLenum* externalFormat,
257 GrGLenum* externalType); 257 GrGLenum* externalType);
258 // helper for onCreateTexture and writeTexturePixels 258 // helper for onCreateTexture and writeTexturePixels
259 bool uploadTexData(const GrGLTexture::Desc& desc, 259 bool uploadTexData(const GrSurfaceDesc& desc,
260 bool isNewTexture, 260 bool isNewTexture,
261 int left, int top, int width, int height, 261 int left, int top, int width, int height,
262 GrPixelConfig dataConfig, 262 GrPixelConfig dataConfig,
263 const void* data, 263 const void* data,
264 size_t rowBytes); 264 size_t rowBytes);
265 265
266 // helper for onCreateCompressedTexture. If width and height are 266 // helper for onCreateCompressedTexture. If width and height are
267 // set to -1, then this function will use desc.fWidth and desc.fHeight 267 // set to -1, then this function will use desc.fWidth and desc.fHeight
268 // for the size of the data. The isNewTexture flag should be set to true 268 // for the size of the data. The isNewTexture flag should be set to true
269 // whenever a new texture needs to be created. Otherwise, we assume that 269 // whenever a new texture needs to be created. Otherwise, we assume that
270 // the texture is already in GPU memory and that it's going to be updated 270 // the texture is already in GPU memory and that it's going to be updated
271 // with new data. 271 // with new data.
272 bool uploadCompressedTexData(const GrGLTexture::Desc& desc, 272 bool uploadCompressedTexData(const GrSurfaceDesc& desc,
273 const void* data, 273 const void* data,
274 bool isNewTexture = true, 274 bool isNewTexture = true,
275 int left = 0, int top = 0, 275 int left = 0, int top = 0,
276 int width = -1, int height = -1); 276 int width = -1, int height = -1);
277 277
278 bool createRenderTargetObjects(int width, int height, 278 bool createRenderTargetObjects(const GrSurfaceDesc&, GrGLuint texID, GrGLRen derTarget::IDDesc*);
279 GrGLuint texID,
280 GrGLRenderTarget::Desc* desc);
281 279
282 GrGLuint bindSurfaceAsFBO(GrSurface* surface, GrGLenum fboTarget, GrGLIRect* viewport); 280 GrGLuint bindSurfaceAsFBO(GrSurface* surface, GrGLenum fboTarget, GrGLIRect* viewport);
283 281
284 GrGLContext fGLContext; 282 GrGLContext fGLContext;
285 283
286 // GL program-related state 284 // GL program-related state
287 ProgramCache* fProgramCache; 285 ProgramCache* fProgramCache;
288 SkAutoTUnref<GrGLProgram> fCurrentProgram; 286 SkAutoTUnref<GrGLProgram> fCurrentProgram;
289 287
290 /////////////////////////////////////////////////////////////////////////// 288 ///////////////////////////////////////////////////////////////////////////
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 448
451 // we record what stencil format worked last time to hopefully exit early 449 // we record what stencil format worked last time to hopefully exit early
452 // from our loop that tries stencil formats and calls check fb status. 450 // from our loop that tries stencil formats and calls check fb status.
453 int fLastSuccessfulStencilFmtIdx; 451 int fLastSuccessfulStencilFmtIdx;
454 452
455 typedef GrGpu INHERITED; 453 typedef GrGpu INHERITED;
456 friend class GrGLPathRendering; // For accessing setTextureUnit. 454 friend class GrGLPathRendering; // For accessing setTextureUnit.
457 }; 455 };
458 456
459 #endif 457 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLTexture.cpp ('k') | src/gpu/gl/GrGpuGL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698