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/GrGLGpu.h

Issue 1207393002: Return GrGLContext from GrTestTarget (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 6 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/gl/GrGLContext.h ('k') | tests/ResourceCacheTest.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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 const SkIRect& srcRect, 102 const SkIRect& srcRect,
103 const SkIPoint& dstPoint) override; 103 const SkIPoint& dstPoint) override;
104 104
105 void xferBarrier(GrRenderTarget*, GrXferBarrierType) override; 105 void xferBarrier(GrRenderTarget*, GrXferBarrierType) override;
106 106
107 void buildProgramDesc(GrProgramDesc*, 107 void buildProgramDesc(GrProgramDesc*,
108 const GrPrimitiveProcessor&, 108 const GrPrimitiveProcessor&,
109 const GrPipeline&, 109 const GrPipeline&,
110 const GrBatchTracker&) const override; 110 const GrBatchTracker&) const override;
111 111
112 virtual const GrGLInterface* glInterfaceForTesting() const { 112 const GrGLContext* glContextForTesting() const override {
113 return this->glInterface(); 113 return &this->glContext();
114 } 114 }
115 115
116 private: 116 private:
117 GrGLGpu(GrGLContext* ctx, GrContext* context); 117 GrGLGpu(GrGLContext* ctx, GrContext* context);
118 118
119 // GrGpu overrides 119 // GrGpu overrides
120 void onResetContext(uint32_t resetBits) override; 120 void onResetContext(uint32_t resetBits) override;
121 121
122 GrTexture* onCreateTexture(const GrSurfaceDesc& desc, GrGpuResource::LifeCyc le lifeCycle, 122 GrTexture* onCreateTexture(const GrSurfaceDesc& desc, GrGpuResource::LifeCyc le lifeCycle,
123 const void* srcData, size_t rowBytes) override; 123 const void* srcData, size_t rowBytes) override;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 enum TempFBOTarget { 293 enum TempFBOTarget {
294 kSrc_TempFBOTarget, 294 kSrc_TempFBOTarget,
295 kDst_TempFBOTarget 295 kDst_TempFBOTarget
296 }; 296 };
297 297
298 GrGLuint bindSurfaceAsFBO(GrSurface* surface, GrGLenum fboTarget, GrGLIRect* viewport, 298 GrGLuint bindSurfaceAsFBO(GrSurface* surface, GrGLenum fboTarget, GrGLIRect* viewport,
299 TempFBOTarget tempFBOTarget); 299 TempFBOTarget tempFBOTarget);
300 300
301 void unbindTextureFromFBO(GrGLenum fboTarget); 301 void unbindTextureFromFBO(GrGLenum fboTarget);
302 302
303 SkAutoTDelete<GrGLContext> fGLContext; 303 SkAutoTUnref<GrGLContext> fGLContext;
304 304
305 void createCopyProgram(); 305 void createCopyProgram();
306 306
307 // GL program-related state 307 // GL program-related state
308 ProgramCache* fProgramCache; 308 ProgramCache* fProgramCache;
309 309
310 /////////////////////////////////////////////////////////////////////////// 310 ///////////////////////////////////////////////////////////////////////////
311 ///@name Caching of GL State 311 ///@name Caching of GL State
312 ///@{ 312 ///@{
313 int fHWActiveTextureUnitIdx; 313 int fHWActiveTextureUnitIdx;
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 496
497 // we record what stencil format worked last time to hopefully exit early 497 // we record what stencil format worked last time to hopefully exit early
498 // from our loop that tries stencil formats and calls check fb status. 498 // from our loop that tries stencil formats and calls check fb status.
499 int fLastSuccessfulStencilFmtIdx; 499 int fLastSuccessfulStencilFmtIdx;
500 500
501 typedef GrGpu INHERITED; 501 typedef GrGpu INHERITED;
502 friend class GrGLPathRendering; // For accessing setTextureUnit. 502 friend class GrGLPathRendering; // For accessing setTextureUnit.
503 }; 503 };
504 504
505 #endif 505 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLContext.h ('k') | tests/ResourceCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698