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

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

Issue 1785873003: Implement GL support for buffer textures (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_glTexBuffer
Patch Set: rebase Created 4 years, 9 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/GrTextureAccess.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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 GrGLSLGeneration glslGeneration() const { return fGLContext->glslGeneration( ); } 51 GrGLSLGeneration glslGeneration() const { return fGLContext->glslGeneration( ); }
52 const GrGLCaps& glCaps() const { return *fGLContext->caps(); } 52 const GrGLCaps& glCaps() const { return *fGLContext->caps(); }
53 53
54 GrGLPathRendering* glPathRendering() { 54 GrGLPathRendering* glPathRendering() {
55 SkASSERT(glCaps().shaderCaps()->pathRenderingSupport()); 55 SkASSERT(glCaps().shaderCaps()->pathRenderingSupport());
56 return static_cast<GrGLPathRendering*>(pathRendering()); 56 return static_cast<GrGLPathRendering*>(pathRendering());
57 } 57 }
58 58
59 void discard(GrRenderTarget*) override; 59 void discard(GrRenderTarget*) override;
60 60
61 // Used by GrGLProgram to configure OpenGL state.
62 void bindTexture(int unitIdx, const GrTextureParams& params, GrGLTexture* te xture);
63
64 bool onGetReadPixelsInfo(GrSurface* srcSurface, int readWidth, int readHeigh t, size_t rowBytes, 61 bool onGetReadPixelsInfo(GrSurface* srcSurface, int readWidth, int readHeigh t, size_t rowBytes,
65 GrPixelConfig readConfig, DrawPreference*, 62 GrPixelConfig readConfig, DrawPreference*,
66 ReadPixelTempDrawInfo*) override; 63 ReadPixelTempDrawInfo*) override;
67 64
68 bool onGetWritePixelsInfo(GrSurface* dstSurface, int width, int height, 65 bool onGetWritePixelsInfo(GrSurface* dstSurface, int width, int height,
69 GrPixelConfig srcConfig, DrawPreference*, 66 GrPixelConfig srcConfig, DrawPreference*,
70 WritePixelTempDrawInfo*) override; 67 WritePixelTempDrawInfo*) override;
71 68
72 bool initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) const override; 69 bool initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) const override;
73 70
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // an into the index buffer. It does not account for vertices.startIndex() b ut rather the start 234 // an into the index buffer. It does not account for vertices.startIndex() b ut rather the start
238 // index is relative to the returned offset. 235 // index is relative to the returned offset.
239 void setupGeometry(const GrPrimitiveProcessor&, 236 void setupGeometry(const GrPrimitiveProcessor&,
240 const GrNonInstancedMesh& mesh, 237 const GrNonInstancedMesh& mesh,
241 size_t* indexOffsetInBytes); 238 size_t* indexOffsetInBytes);
242 239
243 void flushBlend(const GrXferProcessor::BlendInfo& blendInfo, const GrSwizzle &); 240 void flushBlend(const GrXferProcessor::BlendInfo& blendInfo, const GrSwizzle &);
244 241
245 bool hasExtension(const char* ext) const { return fGLContext->hasExtension(e xt); } 242 bool hasExtension(const char* ext) const { return fGLContext->hasExtension(e xt); }
246 243
244 // binds a texture to its target, on the specified texture unit
245 void bindTexture(int unitIdx, GrGLTexture*);
246
247 // binds a texture and flushes texture params to it
248 void flushTexture(int unitIdx, const GrTextureParams& params, GrGLTexture* t exture);
249
247 void copySurfaceAsDraw(GrSurface* dst, 250 void copySurfaceAsDraw(GrSurface* dst,
248 GrSurface* src, 251 GrSurface* src,
249 const SkIRect& srcRect, 252 const SkIRect& srcRect,
250 const SkIPoint& dstPoint); 253 const SkIPoint& dstPoint);
251 void copySurfaceAsCopyTexSubImage(GrSurface* dst, 254 void copySurfaceAsCopyTexSubImage(GrSurface* dst,
252 GrSurface* src, 255 GrSurface* src,
253 const SkIRect& srcRect, 256 const SkIRect& srcRect,
254 const SkIPoint& dstPoint); 257 const SkIPoint& dstPoint);
255 bool copySurfaceAsBlitFramebuffer(GrSurface* dst, 258 bool copySurfaceAsBlitFramebuffer(GrSurface* dst,
256 GrSurface* src, 259 GrSurface* src,
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 } fPLSSetupProgram; 620 } fPLSSetupProgram;
618 621
619 bool fHWPLSEnabled; 622 bool fHWPLSEnabled;
620 bool fPLSHasBeenUsed; 623 bool fPLSHasBeenUsed;
621 624
622 typedef GrGpu INHERITED; 625 typedef GrGpu INHERITED;
623 friend class GrGLPathRendering; // For accessing setTextureUnit. 626 friend class GrGLPathRendering; // For accessing setTextureUnit.
624 }; 627 };
625 628
626 #endif 629 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrTextureAccess.cpp ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698