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

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

Issue 1815823002: Move SkGLContext and some GrGLInterface implementations to skgputest module (Closed) Base URL: https://chromium.googlesource.com/skia.git@debugobject
Patch Set: fix windows and android? Created 4 years, 8 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/debug/GrFrameBufferObj.h ('k') | src/gpu/gl/debug/GrGLCreateDebugInterface.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2012 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #include "GrFrameBufferObj.h"
9 #include "GrFBBindableObj.h"
10
11 void GrFrameBufferObj::setColor(GrFBBindableObj *buffer) {
12 if (fColorBuffer) {
13 // automatically break the binding of the old buffer
14 GrAlwaysAssert(fColorBuffer->getColorBound(this));
15 fColorBuffer->resetColorBound(this);
16
17 GrAlwaysAssert(!fColorBuffer->getDeleted());
18 fColorBuffer->unref();
19 }
20 fColorBuffer = buffer;
21 if (fColorBuffer) {
22 GrAlwaysAssert(!fColorBuffer->getDeleted());
23 fColorBuffer->ref();
24
25 GrAlwaysAssert(!fColorBuffer->getColorBound(this));
26 fColorBuffer->setColorBound(this);
27 }
28 }
29
30 void GrFrameBufferObj::setDepth(GrFBBindableObj *buffer) {
31 if (fDepthBuffer) {
32 // automatically break the binding of the old buffer
33 GrAlwaysAssert(fDepthBuffer->getDepthBound(this));
34 fDepthBuffer->resetDepthBound(this);
35
36 GrAlwaysAssert(!fDepthBuffer->getDeleted());
37 fDepthBuffer->unref();
38 }
39 fDepthBuffer = buffer;
40 if (fDepthBuffer) {
41 GrAlwaysAssert(!fDepthBuffer->getDeleted());
42 fDepthBuffer->ref();
43
44 GrAlwaysAssert(!fDepthBuffer->getDepthBound(this));
45 fDepthBuffer->setDepthBound(this);
46 }
47 }
48
49 void GrFrameBufferObj::setStencil(GrFBBindableObj *buffer) {
50 if (fStencilBuffer) {
51 // automatically break the binding of the old buffer
52 GrAlwaysAssert(fStencilBuffer->getStencilBound(this));
53 fStencilBuffer->resetStencilBound(this);
54
55 //GrAlwaysAssert(!fStencilBuffer->getDeleted());
56 fStencilBuffer->unref();
57 }
58 fStencilBuffer = buffer;
59 if (fStencilBuffer) {
60 GrAlwaysAssert(!fStencilBuffer->getDeleted());
61 fStencilBuffer->ref();
62
63 GrAlwaysAssert(!fStencilBuffer->getStencilBound(this));
64 fStencilBuffer->setStencilBound(this);
65 }
66 }
OLDNEW
« no previous file with comments | « src/gpu/gl/debug/GrFrameBufferObj.h ('k') | src/gpu/gl/debug/GrGLCreateDebugInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698