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

Side by Side Diff: cc/scoped_texture.h

Issue 11377055: cc: Rename Texture class to Resource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « cc/scoped_resource_unittest.cc ('k') | cc/scoped_texture.cc » ('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 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_SCOPED_TEXTURE_H_
6 #define CC_SCOPED_TEXTURE_H_
7
8 #include "base/basictypes.h"
9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "cc/cc_export.h"
12 #include "cc/texture.h"
13
14 #ifndef NDEBUG
15 #include "base/threading/platform_thread.h"
16 #endif
17
18 namespace cc {
19
20 class CC_EXPORT ScopedTexture : protected Texture {
21 public:
22 static scoped_ptr<ScopedTexture> create(ResourceProvider* resourceProvider) { return make_scoped_ptr(new ScopedTexture(resourceProvider)); }
23 virtual ~ScopedTexture();
24
25 using Texture::id;
26 using Texture::size;
27 using Texture::format;
28 using Texture::bytes;
29
30 bool allocate(int pool, const gfx::Size&, GLenum format, ResourceProvider::T extureUsageHint);
31 void free();
32 void leak();
33
34 protected:
35 explicit ScopedTexture(ResourceProvider*);
36
37 private:
38 ResourceProvider* m_resourceProvider;
39
40 #ifndef NDEBUG
41 base::PlatformThreadId m_allocateThreadIdentifier;
42 #endif
43
44 DISALLOW_COPY_AND_ASSIGN(ScopedTexture);
45 };
46
47 }
48
49 #endif // CC_SCOPED_TEXTURE_H_
OLDNEW
« no previous file with comments | « cc/scoped_resource_unittest.cc ('k') | cc/scoped_texture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698