OLD | NEW |
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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 const SkIPoint& dstPoint); | 238 const SkIPoint& dstPoint); |
239 void copySurfaceAsCopyTexSubImage(GrSurface* dst, | 239 void copySurfaceAsCopyTexSubImage(GrSurface* dst, |
240 GrSurface* src, | 240 GrSurface* src, |
241 const SkIRect& srcRect, | 241 const SkIRect& srcRect, |
242 const SkIPoint& dstPoint); | 242 const SkIPoint& dstPoint); |
243 bool copySurfaceAsBlitFramebuffer(GrSurface* dst, | 243 bool copySurfaceAsBlitFramebuffer(GrSurface* dst, |
244 GrSurface* src, | 244 GrSurface* src, |
245 const SkIRect& srcRect, | 245 const SkIRect& srcRect, |
246 const SkIPoint& dstPoint); | 246 const SkIPoint& dstPoint); |
247 | 247 |
248 void stampRectUsingProgram(GrGLuint program, const SkRect& bounds, GrGLint p
osXformUniform, | 248 void stampRectUsingProgram(GrGLuint program, const SkRect& bounds, GrGLint p
osXformUniform, |
249 GrGLuint arrayBuffer); | 249 GrGLuint arrayBuffer); |
250 | 250 |
251 void setupPixelLocalStorage(const GrPipeline&, const GrPrimitiveProcessor&); | 251 void setupPixelLocalStorage(const GrPipeline&, const GrPrimitiveProcessor&); |
252 | 252 |
253 static bool BlendCoeffReferencesConstant(GrBlendCoeff coeff); | 253 static bool BlendCoeffReferencesConstant(GrBlendCoeff coeff); |
254 | 254 |
255 class ProgramCache : public ::SkNoncopyable { | 255 class ProgramCache : public ::SkNoncopyable { |
256 public: | 256 public: |
257 ProgramCache(GrGLGpu* gpu); | 257 ProgramCache(GrGLGpu* gpu); |
258 ~ProgramCache(); | 258 ~ProgramCache(); |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 /** | 496 /** |
497 * Binds the vertex array object that should be used to render from the
vertex buffer. | 497 * Binds the vertex array object that should be used to render from the
vertex buffer. |
498 * The vertex array is bound and its attrib array state object is return
ed. The vertex | 498 * The vertex array is bound and its attrib array state object is return
ed. The vertex |
499 * buffer is bound. The index buffer (if non-nullptr) is bound to the ve
rtex array. The | 499 * buffer is bound. The index buffer (if non-nullptr) is bound to the ve
rtex array. The |
500 * returned GrGLAttribArrayState should be used to set vertex attribute
arrays. | 500 * returned GrGLAttribArrayState should be used to set vertex attribute
arrays. |
501 */ | 501 */ |
502 GrGLAttribArrayState* bindArrayAndBuffersToDraw(GrGLGpu* gpu, | 502 GrGLAttribArrayState* bindArrayAndBuffersToDraw(GrGLGpu* gpu, |
503 const GrGLBuffer* vbuffe
r, | 503 const GrGLBuffer* vbuffe
r, |
504 const GrGLBuffer* ibuffe
r); | 504 const GrGLBuffer* ibuffe
r); |
505 | 505 |
506 /** Variants of the above that takes GL buffer IDs. Note that 0 does not
imply that a | 506 /** Variants of the above that takes GL buffer IDs. Note that 0 does not
imply that a |
507 buffer won't be bound. The "default buffer" will be bound, which is
used for client-side | 507 buffer won't be bound. The "default buffer" will be bound, which is
used for client-side |
508 array rendering. */ | 508 array rendering. */ |
509 GrGLAttribArrayState* bindArrayAndBufferToDraw(GrGLGpu* gpu, GrGLuint vb
ufferID); | 509 GrGLAttribArrayState* bindArrayAndBufferToDraw(GrGLGpu* gpu, GrGLuint vb
ufferID); |
510 GrGLAttribArrayState* bindArrayAndBuffersToDraw(GrGLGpu* gpu, | 510 GrGLAttribArrayState* bindArrayAndBuffersToDraw(GrGLGpu* gpu, |
511 GrGLuint vbufferID, | 511 GrGLuint vbufferID, |
512 GrGLuint ibufferID); | 512 GrGLuint ibufferID); |
513 | 513 |
514 private: | 514 private: |
515 GrGLAttribArrayState* internalBind(GrGLGpu* gpu, GrGLuint vbufferID, GrG
Luint* ibufferID); | 515 GrGLAttribArrayState* internalBind(GrGLGpu* gpu, GrGLuint vbufferID, GrG
Luint* ibufferID); |
516 | 516 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 bool fHWPLSEnabled; | 608 bool fHWPLSEnabled; |
609 bool fPLSHasBeenUsed; | 609 bool fPLSHasBeenUsed; |
610 | 610 |
611 float fHWMinSampleShading; | 611 float fHWMinSampleShading; |
612 | 612 |
613 typedef GrGpu INHERITED; | 613 typedef GrGpu INHERITED; |
614 friend class GrGLPathRendering; // For accessing setTextureUnit. | 614 friend class GrGLPathRendering; // For accessing setTextureUnit. |
615 }; | 615 }; |
616 | 616 |
617 #endif | 617 #endif |
OLD | NEW |