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 GrGpuGL_DEFINED | 8 #ifndef GrGpuGL_DEFINED |
9 #define GrGpuGL_DEFINED | 9 #define GrGpuGL_DEFINED |
10 | 10 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 GrPixelConfig surfaceConfig
) const SK_OVERRIDE; | 61 GrPixelConfig surfaceConfig
) const SK_OVERRIDE; |
62 virtual bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig
) const SK_OVERRIDE; | 62 virtual bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig
) const SK_OVERRIDE; |
63 virtual bool readPixelsWillPayForYFlip( | 63 virtual bool readPixelsWillPayForYFlip( |
64 GrRenderTarget* renderTarget, | 64 GrRenderTarget* renderTarget, |
65 int left, int top, | 65 int left, int top, |
66 int width, int height, | 66 int width, int height, |
67 GrPixelConfig config, | 67 GrPixelConfig config, |
68 size_t rowBytes) const SK_OVERRIDE; | 68 size_t rowBytes) const SK_OVERRIDE; |
69 virtual bool fullReadPixelsIsFasterThanPartial() const SK_OVERRIDE; | 69 virtual bool fullReadPixelsIsFasterThanPartial() const SK_OVERRIDE; |
70 | 70 |
71 virtual void initCopySurfaceDstDesc(const GrSurface* src, GrTextureDesc* des
c) SK_OVERRIDE; | 71 virtual void initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* des
c) SK_OVERRIDE; |
72 | 72 |
73 // These functions should be used to bind GL objects. They track the GL stat
e and skip redundant | 73 // These functions should be used to bind GL objects. They track the GL stat
e and skip redundant |
74 // bindings. Making the equivalent glBind calls directly will confuse the st
ate tracking. | 74 // bindings. Making the equivalent glBind calls directly will confuse the st
ate tracking. |
75 void bindVertexArray(GrGLuint id) { | 75 void bindVertexArray(GrGLuint id) { |
76 fHWGeometryState.setVertexArrayID(this, id); | 76 fHWGeometryState.setVertexArrayID(this, id); |
77 } | 77 } |
78 void bindIndexBufferAndDefaultVertexArray(GrGLuint id) { | 78 void bindIndexBufferAndDefaultVertexArray(GrGLuint id) { |
79 fHWGeometryState.setIndexBufferIDOnDefaultVertexArray(this, id); | 79 fHWGeometryState.setIndexBufferIDOnDefaultVertexArray(this, id); |
80 } | 80 } |
81 void bindVertexBuffer(GrGLuint id) { | 81 void bindVertexBuffer(GrGLuint id) { |
(...skipping 20 matching lines...) Expand all Loading... |
102 | 102 |
103 virtual bool onCanCopySurface(GrSurface* dst, | 103 virtual bool onCanCopySurface(GrSurface* dst, |
104 GrSurface* src, | 104 GrSurface* src, |
105 const SkIRect& srcRect, | 105 const SkIRect& srcRect, |
106 const SkIPoint& dstPoint) SK_OVERRIDE; | 106 const SkIPoint& dstPoint) SK_OVERRIDE; |
107 | 107 |
108 private: | 108 private: |
109 // GrGpu overrides | 109 // GrGpu overrides |
110 virtual void onResetContext(uint32_t resetBits) SK_OVERRIDE; | 110 virtual void onResetContext(uint32_t resetBits) SK_OVERRIDE; |
111 | 111 |
112 virtual GrTexture* onCreateTexture(const GrTextureDesc& desc, | 112 virtual GrTexture* onCreateTexture(const GrSurfaceDesc& desc, |
113 const void* srcData, | 113 const void* srcData, |
114 size_t rowBytes) SK_OVERRIDE; | 114 size_t rowBytes) SK_OVERRIDE; |
115 virtual GrTexture* onCreateCompressedTexture(const GrTextureDesc& desc, | 115 virtual GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, |
116 const void* srcData) SK_OVERRID
E; | 116 const void* srcData) SK_OVERRID
E; |
117 virtual GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) SK_O
VERRIDE; | 117 virtual GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) SK_O
VERRIDE; |
118 virtual GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) SK_OVE
RRIDE; | 118 virtual GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) SK_OVE
RRIDE; |
119 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) SK_OVER
RIDE; | 119 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) SK_OVER
RIDE; |
120 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge
tDesc&) SK_OVERRIDE; | 120 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge
tDesc&) SK_OVERRIDE; |
121 virtual bool createStencilBufferForRenderTarget(GrRenderTarget* rt, | 121 virtual bool createStencilBufferForRenderTarget(GrRenderTarget* rt, |
122 int width, | 122 int width, |
123 int height) SK_OVERRIDE; | 123 int height) SK_OVERRIDE; |
124 virtual bool attachStencilBufferToRenderTarget( | 124 virtual bool attachStencilBufferToRenderTarget( |
125 GrStencilBuffer* sb, | 125 GrStencilBuffer* sb, |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 | 445 |
446 // we record what stencil format worked last time to hopefully exit early | 446 // we record what stencil format worked last time to hopefully exit early |
447 // from our loop that tries stencil formats and calls check fb status. | 447 // from our loop that tries stencil formats and calls check fb status. |
448 int fLastSuccessfulStencilFmtIdx; | 448 int fLastSuccessfulStencilFmtIdx; |
449 | 449 |
450 typedef GrGpu INHERITED; | 450 typedef GrGpu INHERITED; |
451 friend class GrGLPathRendering; // For accessing setTextureUnit. | 451 friend class GrGLPathRendering; // For accessing setTextureUnit. |
452 }; | 452 }; |
453 | 453 |
454 #endif | 454 #endif |
OLD | NEW |