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

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

Issue 1257073003: Move draw on upload decision in GrGpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fixed for sw conversion case Created 5 years, 4 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/GrTest.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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 GrGLPathRendering* glPathRendering() { 50 GrGLPathRendering* glPathRendering() {
51 SkASSERT(glCaps().shaderCaps()->pathRenderingSupport()); 51 SkASSERT(glCaps().shaderCaps()->pathRenderingSupport());
52 return static_cast<GrGLPathRendering*>(pathRendering()); 52 return static_cast<GrGLPathRendering*>(pathRendering());
53 } 53 }
54 54
55 void discard(GrRenderTarget*) override; 55 void discard(GrRenderTarget*) override;
56 56
57 // Used by GrGLProgram to configure OpenGL state. 57 // Used by GrGLProgram to configure OpenGL state.
58 void bindTexture(int unitIdx, const GrTextureParams& params, GrGLTexture* te xture); 58 void bindTexture(int unitIdx, const GrTextureParams& params, GrGLTexture* te xture);
59 59
60 bool getReadPixelsInfo(GrSurface* srcSurface, int readWidth, int readHeight, size_t rowBytes, 60 bool onGetReadPixelsInfo(GrSurface* srcSurface, int readWidth, int readHeigh t, size_t rowBytes,
61 GrPixelConfig readConfig, DrawPreference*, 61 GrPixelConfig readConfig, DrawPreference*,
62 ReadPixelTempDrawInfo*) override; 62 ReadPixelTempDrawInfo*) override;
63 63
64 64 bool onGetWritePixelsInfo(GrSurface* dstSurface, int width, int height,
65 // GrGpu overrides 65 size_t rowBytes, GrPixelConfig srcConfig, DrawPref erence*,
66 GrPixelConfig preferredWritePixelsConfig(GrPixelConfig writeConfig, 66 WritePixelTempDrawInfo*) override;
67 GrPixelConfig surfaceConfig) const override;
68 bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig) const override;
69 67
70 bool initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) const override; 68 bool initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) const override;
71 69
72 // These functions should be used to bind GL objects. They track the GL stat e and skip redundant 70 // These functions should be used to bind GL objects. They track the GL stat e and skip redundant
73 // bindings. Making the equivalent glBind calls directly will confuse the st ate tracking. 71 // bindings. Making the equivalent glBind calls directly will confuse the st ate tracking.
74 void bindVertexArray(GrGLuint id) { 72 void bindVertexArray(GrGLuint id) {
75 fHWGeometryState.setVertexArrayID(this, id); 73 fHWGeometryState.setVertexArrayID(this, id);
76 } 74 }
77 void bindIndexBufferAndDefaultVertexArray(GrGLuint id) { 75 void bindIndexBufferAndDefaultVertexArray(GrGLuint id) {
78 fHWGeometryState.setIndexBufferIDOnDefaultVertexArray(this, id); 76 fHWGeometryState.setIndexBufferIDOnDefaultVertexArray(this, id);
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 495
498 // we record what stencil format worked last time to hopefully exit early 496 // we record what stencil format worked last time to hopefully exit early
499 // from our loop that tries stencil formats and calls check fb status. 497 // from our loop that tries stencil formats and calls check fb status.
500 int fLastSuccessfulStencilFmtIdx; 498 int fLastSuccessfulStencilFmtIdx;
501 499
502 typedef GrGpu INHERITED; 500 typedef GrGpu INHERITED;
503 friend class GrGLPathRendering; // For accessing setTextureUnit. 501 friend class GrGLPathRendering; // For accessing setTextureUnit.
504 }; 502 };
505 503
506 #endif 504 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrTest.cpp ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698