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

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: Add #define to not always compile in ETC1 support 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 | « src/gpu/SkGr.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 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) SK_OVERRID E;
127 virtual GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) SK_O VERRIDE; 129 virtual GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) SK_O VERRIDE;
128 virtual GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) SK_OVE RRIDE; 130 virtual GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) SK_OVE RRIDE;
129 virtual GrPath* onCreatePath(const SkPath&, const SkStrokeRec&) SK_OVERRIDE; 131 virtual GrPath* onCreatePath(const SkPath&, const SkStrokeRec&) SK_OVERRIDE;
130 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) SK_OVER RIDE; 132 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) SK_OVER RIDE;
131 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge tDesc&) SK_OVERRIDE; 133 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge tDesc&) SK_OVERRIDE;
132 virtual bool createStencilBufferForRenderTarget(GrRenderTarget* rt, 134 virtual bool createStencilBufferForRenderTarget(GrRenderTarget* rt,
133 int width, 135 int width,
134 int height) SK_OVERRIDE; 136 int height) SK_OVERRIDE;
135 virtual bool attachStencilBufferToRenderTarget( 137 virtual bool attachStencilBufferToRenderTarget(
136 GrStencilBuffer* sb, 138 GrStencilBuffer* sb,
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 GrGLenum* externalFormat, 260 GrGLenum* externalFormat,
259 GrGLenum* externalType); 261 GrGLenum* externalType);
260 // helper for onCreateTexture and writeTexturePixels 262 // helper for onCreateTexture and writeTexturePixels
261 bool uploadTexData(const GrGLTexture::Desc& desc, 263 bool uploadTexData(const GrGLTexture::Desc& desc,
262 bool isNewTexture, 264 bool isNewTexture,
263 int left, int top, int width, int height, 265 int left, int top, int width, int height,
264 GrPixelConfig dataConfig, 266 GrPixelConfig dataConfig,
265 const void* data, 267 const void* data,
266 size_t rowBytes); 268 size_t rowBytes);
267 269
270 // helper for onCreateCompressedTexture
271 bool uploadCompressedTexData(const GrGLTexture::Desc& desc,
272 const void* data);
273
268 bool createRenderTargetObjects(int width, int height, 274 bool createRenderTargetObjects(int width, int height,
269 GrGLuint texID, 275 GrGLuint texID,
270 GrGLRenderTarget::Desc* desc); 276 GrGLRenderTarget::Desc* desc);
271 277
272 GrGLContext fGLContext; 278 GrGLContext fGLContext;
273 279
274 // GL program-related state 280 // GL program-related state
275 ProgramCache* fProgramCache; 281 ProgramCache* fProgramCache;
276 SkAutoTUnref<GrGLProgram> fCurrentProgram; 282 SkAutoTUnref<GrGLProgram> fCurrentProgram;
277 283
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 ///@} 462 ///@}
457 463
458 // we record what stencil format worked last time to hopefully exit early 464 // 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. 465 // from our loop that tries stencil formats and calls check fb status.
460 int fLastSuccessfulStencilFmtIdx; 466 int fLastSuccessfulStencilFmtIdx;
461 467
462 typedef GrGpu INHERITED; 468 typedef GrGpu INHERITED;
463 }; 469 };
464 470
465 #endif 471 #endif
OLDNEW
« no previous file with comments | « src/gpu/SkGr.cpp ('k') | src/gpu/gl/GrGpuGL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698