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

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

Issue 302783002: Initial work to get ETC1 data up to the GPU (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix some code clarity issues Created 6 years, 7 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 #ifndef GrGpuGL_DEFINED 8 #ifndef GrGpuGL_DEFINED
9 #define GrGpuGL_DEFINED 9 #define GrGpuGL_DEFINED
10 10
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 const SkIRect& srcRect, 117 const SkIRect& srcRect,
118 const SkIPoint& dstPoint) SK_OVERRIDE; 118 const SkIPoint& dstPoint) SK_OVERRIDE;
119 119
120 private: 120 private:
121 // GrGpu overrides 121 // GrGpu overrides
122 virtual void onResetContext(uint32_t resetBits) SK_OVERRIDE; 122 virtual void onResetContext(uint32_t resetBits) SK_OVERRIDE;
123 123
124 virtual GrTexture* onCreateTexture(const GrTextureDesc& desc, 124 virtual GrTexture* onCreateTexture(const GrTextureDesc& desc,
125 const void* srcData, 125 const void* srcData,
126 size_t rowBytes) SK_OVERRIDE; 126 size_t rowBytes) SK_OVERRIDE;
127 virtual GrTexture* onCreateCompressedTexture(const GrTextureDesc& desc,
128 const void* srcData,
129 GrCompressedFormat format) SK_O VERRIDE;
127 virtual GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) SK_O VERRIDE; 130 virtual GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) SK_O VERRIDE;
128 virtual GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) SK_OVE RRIDE; 131 virtual GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) SK_OVE RRIDE;
129 virtual GrPath* onCreatePath(const SkPath&, const SkStrokeRec&) SK_OVERRIDE; 132 virtual GrPath* onCreatePath(const SkPath&, const SkStrokeRec&) SK_OVERRIDE;
130 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) SK_OVER RIDE; 133 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) SK_OVER RIDE;
131 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge tDesc&) SK_OVERRIDE; 134 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge tDesc&) SK_OVERRIDE;
132 virtual bool createStencilBufferForRenderTarget(GrRenderTarget* rt, 135 virtual bool createStencilBufferForRenderTarget(GrRenderTarget* rt,
133 int width, 136 int width,
134 int height) SK_OVERRIDE; 137 int height) SK_OVERRIDE;
135 virtual bool attachStencilBufferToRenderTarget( 138 virtual bool attachStencilBufferToRenderTarget(
136 GrStencilBuffer* sb, 139 GrStencilBuffer* sb,
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 GrGLenum* externalFormat, 261 GrGLenum* externalFormat,
259 GrGLenum* externalType); 262 GrGLenum* externalType);
260 // helper for onCreateTexture and writeTexturePixels 263 // helper for onCreateTexture and writeTexturePixels
261 bool uploadTexData(const GrGLTexture::Desc& desc, 264 bool uploadTexData(const GrGLTexture::Desc& desc,
262 bool isNewTexture, 265 bool isNewTexture,
263 int left, int top, int width, int height, 266 int left, int top, int width, int height,
264 GrPixelConfig dataConfig, 267 GrPixelConfig dataConfig,
265 const void* data, 268 const void* data,
266 size_t rowBytes); 269 size_t rowBytes);
267 270
271 // helper for onCreateCompressedTexture
272 bool compressedFormatToGLFormats(GrCompressedFormat fmt, GrGLenum* internalF ormat);
273 bool uploadCompressedTexData(const GrGLTexture::Desc& desc,
274 GrCompressedFormat fmt,
275 const void* data);
276
268 bool createRenderTargetObjects(int width, int height, 277 bool createRenderTargetObjects(int width, int height,
269 GrGLuint texID, 278 GrGLuint texID,
270 GrGLRenderTarget::Desc* desc); 279 GrGLRenderTarget::Desc* desc);
271 280
272 GrGLContext fGLContext; 281 GrGLContext fGLContext;
273 282
274 // GL program-related state 283 // GL program-related state
275 ProgramCache* fProgramCache; 284 ProgramCache* fProgramCache;
276 SkAutoTUnref<GrGLProgram> fCurrentProgram; 285 SkAutoTUnref<GrGLProgram> fCurrentProgram;
277 286
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 ///@} 465 ///@}
457 466
458 // we record what stencil format worked last time to hopefully exit early 467 // we record what stencil format worked last time to hopefully exit early
459 // from our loop that tries stencil formats and calls check fb status. 468 // from our loop that tries stencil formats and calls check fb status.
460 int fLastSuccessfulStencilFmtIdx; 469 int fLastSuccessfulStencilFmtIdx;
461 470
462 typedef GrGpu INHERITED; 471 typedef GrGpu INHERITED;
463 }; 472 };
464 473
465 #endif 474 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698