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

Side by Side Diff: tools/gpu/gl/debug/GrFrameBufferObj.cpp

Issue 2085553004: Don't track FB depth attachment in debug GL context (Closed) Base URL: https://skia.googlesource.com/skia.git@fix_testing
Patch Set: Created 4 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 | « tools/gpu/gl/debug/GrFrameBufferObj.h ('k') | no next file » | 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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrFrameBufferObj.h" 9 #include "GrFrameBufferObj.h"
10 #include "GrFBBindableObj.h" 10 #include "GrFBBindableObj.h"
(...skipping 10 matching lines...) Expand all
21 fColorBuffer = buffer; 21 fColorBuffer = buffer;
22 if (fColorBuffer) { 22 if (fColorBuffer) {
23 GrAlwaysAssert(!fColorBuffer->getDeleted()); 23 GrAlwaysAssert(!fColorBuffer->getDeleted());
24 fColorBuffer->ref(); 24 fColorBuffer->ref();
25 25
26 GrAlwaysAssert(!fColorBuffer->getColorBound(this)); 26 GrAlwaysAssert(!fColorBuffer->getColorBound(this));
27 fColorBuffer->setColorBound(this); 27 fColorBuffer->setColorBound(this);
28 } 28 }
29 } 29 }
30 30
31 void GrFrameBufferObj::setDepth(GrFBBindableObj *buffer) {
32 if (fDepthBuffer) {
33 // automatically break the binding of the old buffer
34 GrAlwaysAssert(fDepthBuffer->getDepthBound(this));
35 fDepthBuffer->resetDepthBound(this);
36
37 GrAlwaysAssert(!fDepthBuffer->getDeleted());
38 fDepthBuffer->unref();
39 }
40 fDepthBuffer = buffer;
41 if (fDepthBuffer) {
42 GrAlwaysAssert(!fDepthBuffer->getDeleted());
43 fDepthBuffer->ref();
44
45 GrAlwaysAssert(!fDepthBuffer->getDepthBound(this));
46 fDepthBuffer->setDepthBound(this);
47 }
48 }
49
50 void GrFrameBufferObj::setStencil(GrFBBindableObj *buffer) { 31 void GrFrameBufferObj::setStencil(GrFBBindableObj *buffer) {
51 if (fStencilBuffer) { 32 if (fStencilBuffer) {
52 // automatically break the binding of the old buffer 33 // automatically break the binding of the old buffer
53 GrAlwaysAssert(fStencilBuffer->getStencilBound(this)); 34 GrAlwaysAssert(fStencilBuffer->getStencilBound(this));
54 fStencilBuffer->resetStencilBound(this); 35 fStencilBuffer->resetStencilBound(this);
55 36
56 //GrAlwaysAssert(!fStencilBuffer->getDeleted()); 37 //GrAlwaysAssert(!fStencilBuffer->getDeleted());
57 fStencilBuffer->unref(); 38 fStencilBuffer->unref();
58 } 39 }
59 fStencilBuffer = buffer; 40 fStencilBuffer = buffer;
60 if (fStencilBuffer) { 41 if (fStencilBuffer) {
61 GrAlwaysAssert(!fStencilBuffer->getDeleted()); 42 GrAlwaysAssert(!fStencilBuffer->getDeleted());
62 fStencilBuffer->ref(); 43 fStencilBuffer->ref();
63 44
64 GrAlwaysAssert(!fStencilBuffer->getStencilBound(this)); 45 GrAlwaysAssert(!fStencilBuffer->getStencilBound(this));
65 fStencilBuffer->setStencilBound(this); 46 fStencilBuffer->setStencilBound(this);
66 } 47 }
67 } 48 }
OLDNEW
« no previous file with comments | « tools/gpu/gl/debug/GrFrameBufferObj.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698