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

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

Issue 893703003: Save and temp dst and src FBO on GrGLGpu and use the temp FBOs for copySurface if needed. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Nit Created 5 years, 10 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 | « no previous file | 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 // with new data. 276 // with new data.
277 bool uploadCompressedTexData(const GrSurfaceDesc& desc, 277 bool uploadCompressedTexData(const GrSurfaceDesc& desc,
278 const void* data, 278 const void* data,
279 bool isNewTexture = true, 279 bool isNewTexture = true,
280 int left = 0, int top = 0, 280 int left = 0, int top = 0,
281 int width = -1, int height = -1); 281 int width = -1, int height = -1);
282 282
283 bool createRenderTargetObjects(const GrSurfaceDesc&, bool budgeted, GrGLuint texID, 283 bool createRenderTargetObjects(const GrSurfaceDesc&, bool budgeted, GrGLuint texID,
284 GrGLRenderTarget::IDDesc*); 284 GrGLRenderTarget::IDDesc*);
285 285
286 GrGLuint bindSurfaceAsFBO(GrSurface* surface, GrGLenum fboTarget, GrGLIRect* viewport); 286 enum TempFBOTarget {
287 kSrc_TempFBOTarget,
288 kDst_TempFBOTarget
289 };
290
291 GrGLuint bindSurfaceAsFBO(GrSurface* surface, GrGLenum fboTarget, GrGLIRect* viewport,
292 TempFBOTarget tempFBOTarget);
293
294 void unbindTextureFromFBO(GrGLenum fboTarget);
287 295
288 GrGLContext fGLContext; 296 GrGLContext fGLContext;
289 297
290 // GL program-related state 298 // GL program-related state
291 ProgramCache* fProgramCache; 299 ProgramCache* fProgramCache;
292 SkAutoTUnref<GrGLProgram> fCurrentProgram; 300 SkAutoTUnref<GrGLProgram> fCurrentProgram;
293 301
294 /////////////////////////////////////////////////////////////////////////// 302 ///////////////////////////////////////////////////////////////////////////
295 ///@name Caching of GL State 303 ///@name Caching of GL State
296 ///@{ 304 ///@{
297 int fHWActiveTextureUnitIdx; 305 int fHWActiveTextureUnitIdx;
298 GrGLuint fHWProgramID; 306 GrGLuint fHWProgramID;
299 307
300 enum TriState { 308 enum TriState {
301 kNo_TriState, 309 kNo_TriState,
302 kYes_TriState, 310 kYes_TriState,
303 kUnknown_TriState 311 kUnknown_TriState
304 }; 312 };
305 313
314 GrGLuint fTempSrcFBOID;
315 GrGLuint fTempDstFBOID;
316
306 // last scissor / viewport scissor state seen by the GL. 317 // last scissor / viewport scissor state seen by the GL.
307 struct { 318 struct {
308 TriState fEnabled; 319 TriState fEnabled;
309 GrGLIRect fRect; 320 GrGLIRect fRect;
310 void invalidate() { 321 void invalidate() {
311 fEnabled = kUnknown_TriState; 322 fEnabled = kUnknown_TriState;
312 fRect.invalidate(); 323 fRect.invalidate();
313 } 324 }
314 } fHWScissorSettings; 325 } fHWScissorSettings;
315 326
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 465
455 // we record what stencil format worked last time to hopefully exit early 466 // we record what stencil format worked last time to hopefully exit early
456 // from our loop that tries stencil formats and calls check fb status. 467 // from our loop that tries stencil formats and calls check fb status.
457 int fLastSuccessfulStencilFmtIdx; 468 int fLastSuccessfulStencilFmtIdx;
458 469
459 typedef GrGpu INHERITED; 470 typedef GrGpu INHERITED;
460 friend class GrGLPathRendering; // For accessing setTextureUnit. 471 friend class GrGLPathRendering; // For accessing setTextureUnit.
461 }; 472 };
462 473
463 #endif 474 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698