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

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

Issue 1287973003: Check for xfer barriers in GrBatch, auto-issue barriers in GrGpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment 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/effects/GrDashingEffect.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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 89 }
90 void notifyIndexBufferDelete(GrGLuint id) { 90 void notifyIndexBufferDelete(GrGLuint id) {
91 fHWGeometryState.notifyIndexBufferDelete(id); 91 fHWGeometryState.notifyIndexBufferDelete(id);
92 } 92 }
93 93
94 bool copySurface(GrSurface* dst, 94 bool copySurface(GrSurface* dst,
95 GrSurface* src, 95 GrSurface* src,
96 const SkIRect& srcRect, 96 const SkIRect& srcRect,
97 const SkIPoint& dstPoint) override; 97 const SkIPoint& dstPoint) override;
98 98
99 void xferBarrier(GrRenderTarget*, GrXferBarrierType) override;
100
101 void buildProgramDesc(GrProgramDesc*, 99 void buildProgramDesc(GrProgramDesc*,
102 const GrPrimitiveProcessor&, 100 const GrPrimitiveProcessor&,
103 const GrPipeline&, 101 const GrPipeline&,
104 const GrBatchTracker&) const override; 102 const GrBatchTracker&) const override;
105 103
106 const GrGLContext* glContextForTesting() const override { 104 const GrGLContext* glContextForTesting() const override {
107 return &this->glContext(); 105 return &this->glContext();
108 } 106 }
109 107
110 GrBackendObject createTestingOnlyBackendTexture(void* pixels, int w, int h, 108 GrBackendObject createTestingOnlyBackendTexture(void* pixels, int w, int h,
111 GrPixelConfig config) const override; 109 GrPixelConfig config) const override;
112 bool isTestingOnlyBackendTexture(GrBackendObject id) const override; 110 bool isTestingOnlyBackendTexture(GrBackendObject id) const override;
113 void deleteTestingOnlyBackendTexture(GrBackendObject id) const override; 111 void deleteTestingOnlyBackendTexture(GrBackendObject id) const override;
114 112
115 private: 113 private:
116 GrGLGpu(GrGLContext* ctx, GrContext* context); 114 GrGLGpu(GrGLContext* ctx, GrContext* context);
117 115
118 // GrGpu overrides 116 // GrGpu overrides
119 void onResetContext(uint32_t resetBits) override; 117 void onResetContext(uint32_t resetBits) override;
120 118
119 void xferBarrier(GrRenderTarget*, GrXferBarrierType) override;
120
121 GrTexture* onCreateTexture(const GrSurfaceDesc& desc, GrGpuResource::LifeCyc le lifeCycle, 121 GrTexture* onCreateTexture(const GrSurfaceDesc& desc, GrGpuResource::LifeCyc le lifeCycle,
122 const void* srcData, size_t rowBytes) override; 122 const void* srcData, size_t rowBytes) override;
123 GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, 123 GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc,
124 GrGpuResource::LifeCycle lifeCycle, 124 GrGpuResource::LifeCycle lifeCycle,
125 const void* srcData) override; 125 const void* srcData) override;
126 GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) override; 126 GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) override;
127 GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) override; 127 GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) override;
128 GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapOwnership ) override; 128 GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapOwnership ) override;
129 GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&, 129 GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&,
130 GrWrapOwnership) override; 130 GrWrapOwnership) override;
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 495
496 // 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
497 // 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.
498 int fLastSuccessfulStencilFmtIdx; 498 int fLastSuccessfulStencilFmtIdx;
499 499
500 typedef GrGpu INHERITED; 500 typedef GrGpu INHERITED;
501 friend class GrGLPathRendering; // For accessing setTextureUnit. 501 friend class GrGLPathRendering; // For accessing setTextureUnit.
502 }; 502 };
503 503
504 #endif 504 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrDashingEffect.cpp ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698