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

Side by Side Diff: tools/gpu/gl/debug/GrTextureObj.h

Issue 1845473004: Revert of Move SkGLContext and some GrGLInterface implementations to skgputest module (Closed) Base URL: https://chromium.googlesource.com/skia.git@debugobject
Patch Set: 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 | « tools/gpu/gl/debug/GrShaderObj.cpp ('k') | tools/gpu/gl/debug/GrTextureObj.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 /*
3 * Copyright 2012 Google Inc.
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8
9 #ifndef GrTextureObj_DEFINED
10 #define GrTextureObj_DEFINED
11
12 #include "GrFBBindableObj.h"
13
14 class GrTextureUnitObj;
15
16 ////////////////////////////////////////////////////////////////////////////////
17 class GrTextureObj : public GrFBBindableObj {
18 GR_DEFINE_CREATOR(GrTextureObj);
19
20 public:
21 GrTextureObj()
22 : GrFBBindableObj() {
23 }
24
25 virtual ~GrTextureObj() {
26 GrAlwaysAssert(0 == fTextureUnitReferees.count());
27 }
28
29 void setBound(GrTextureUnitObj *referee) {
30 fTextureUnitReferees.append(1, &referee);
31 }
32
33 void resetBound(GrTextureUnitObj *referee) {
34 int index = fTextureUnitReferees.find(referee);
35 GrAlwaysAssert(0 <= index);
36 fTextureUnitReferees.removeShuffle(index);
37 }
38 bool getBound(GrTextureUnitObj *referee) const {
39 int index = fTextureUnitReferees.find(referee);
40 return 0 <= index;
41 }
42 bool getBound() const {
43 return 0 != fTextureUnitReferees.count();
44 }
45
46 void deleteAction() override;
47
48 protected:
49
50 private:
51 // texture units that bind this texture (via "glBindTexture")
52 SkTDArray<GrTextureUnitObj *> fTextureUnitReferees;
53
54 typedef GrFBBindableObj INHERITED;
55 };
56
57 #endif // GrTextureObj_DEFINED
OLDNEW
« no previous file with comments | « tools/gpu/gl/debug/GrShaderObj.cpp ('k') | tools/gpu/gl/debug/GrTextureObj.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698