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

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

Issue 13915011: Add support for using glCopyTexSubImage2D when possible to copy surfaces. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
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 8
9 9
10 #ifndef GrGpuGL_DEFINED 10 #ifndef GrGpuGL_DEFINED
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 virtual GrPixelConfig preferredWritePixelsConfig(GrPixelConfig config) const SK_OVERRIDE; 48 virtual GrPixelConfig preferredWritePixelsConfig(GrPixelConfig config) const SK_OVERRIDE;
49 virtual bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig ) const SK_OVERRIDE; 49 virtual bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig ) const SK_OVERRIDE;
50 virtual bool readPixelsWillPayForYFlip( 50 virtual bool readPixelsWillPayForYFlip(
51 GrRenderTarget* renderTarget, 51 GrRenderTarget* renderTarget,
52 int left, int top, 52 int left, int top,
53 int width, int height, 53 int width, int height,
54 GrPixelConfig config, 54 GrPixelConfig config,
55 size_t rowBytes) const SK_OVERRIDE; 55 size_t rowBytes) const SK_OVERRIDE;
56 virtual bool fullReadPixelsIsFasterThanPartial() const SK_OVERRIDE; 56 virtual bool fullReadPixelsIsFasterThanPartial() const SK_OVERRIDE;
57 57
58 virtual void initCopySurfaceDstDesc(const GrSurface* src, GrTextureDesc* des c) SK_OVERRIDE;
59
58 virtual void abandonResources() SK_OVERRIDE; 60 virtual void abandonResources() SK_OVERRIDE;
59 61
60 const GrGLCaps& glCaps() const { return *fGLContext.info().caps(); } 62 const GrGLCaps& glCaps() const { return *fGLContext.info().caps(); }
61 63
62 // These functions should be used to bind GL objects. They track the GL stat e and skip redundant 64 // These functions should be used to bind GL objects. They track the GL stat e and skip redundant
63 // bindings. Making the equivalent glBind calls directly will confuse the st ate tracking. 65 // bindings. Making the equivalent glBind calls directly will confuse the st ate tracking.
64 void bindVertexArray(GrGLuint id) { 66 void bindVertexArray(GrGLuint id) {
65 fHWGeometryState.setVertexArrayID(this, id); 67 fHWGeometryState.setVertexArrayID(this, id);
66 } 68 }
67 void bindIndexBufferAndDefaultVertexArray(GrGLuint id) { 69 void bindIndexBufferAndDefaultVertexArray(GrGLuint id) {
(...skipping 21 matching lines...) Expand all
89 virtual bool onCopySurface(GrSurface* dst, 91 virtual bool onCopySurface(GrSurface* dst,
90 GrSurface* src, 92 GrSurface* src,
91 const SkIRect& srcRect, 93 const SkIRect& srcRect,
92 const SkIPoint& dstPoint) SK_OVERRIDE; 94 const SkIPoint& dstPoint) SK_OVERRIDE;
93 95
94 virtual bool onCanCopySurface(GrSurface* dst, 96 virtual bool onCanCopySurface(GrSurface* dst,
95 GrSurface* src, 97 GrSurface* src,
96 const SkIRect& srcRect, 98 const SkIRect& srcRect,
97 const SkIPoint& dstPoint) SK_OVERRIDE; 99 const SkIPoint& dstPoint) SK_OVERRIDE;
98 100
99
100 private: 101 private:
101 // GrGpu overrides 102 // GrGpu overrides
102 virtual void onResetContext() SK_OVERRIDE; 103 virtual void onResetContext() SK_OVERRIDE;
103 104
104 virtual GrTexture* onCreateTexture(const GrTextureDesc& desc, 105 virtual GrTexture* onCreateTexture(const GrTextureDesc& desc,
105 const void* srcData, 106 const void* srcData,
106 size_t rowBytes) SK_OVERRIDE; 107 size_t rowBytes) SK_OVERRIDE;
107 virtual GrVertexBuffer* onCreateVertexBuffer(uint32_t size, 108 virtual GrVertexBuffer* onCreateVertexBuffer(uint32_t size,
108 bool dynamic) SK_OVERRIDE; 109 bool dynamic) SK_OVERRIDE;
109 virtual GrIndexBuffer* onCreateIndexBuffer(uint32_t size, 110 virtual GrIndexBuffer* onCreateIndexBuffer(uint32_t size,
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 ///@} 438 ///@}
438 439
439 // we record what stencil format worked last time to hopefully exit early 440 // we record what stencil format worked last time to hopefully exit early
440 // from our loop that tries stencil formats and calls check fb status. 441 // from our loop that tries stencil formats and calls check fb status.
441 int fLastSuccessfulStencilFmtIdx; 442 int fLastSuccessfulStencilFmtIdx;
442 443
443 typedef GrGpu INHERITED; 444 typedef GrGpu INHERITED;
444 }; 445 };
445 446
446 #endif 447 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.cpp ('k') | src/gpu/gl/GrGpuGL.cpp » ('j') | src/gpu/gl/GrGpuGL.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698