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

Side by Side Diff: cc/resources/scoped_resource.h

Issue 1533773002: Delete CC. (Closed) Base URL: git@github.com:domokit/mojo.git@cl-2e
Patch Set: rebase Created 5 years 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 | « cc/resources/returned_resource.h ('k') | cc/resources/scoped_resource.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_RESOURCES_SCOPED_RESOURCE_H_
6 #define CC_RESOURCES_SCOPED_RESOURCE_H_
7
8 #include "base/basictypes.h"
9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "cc/resources/resource.h"
12
13 #if DCHECK_IS_ON()
14 #include "base/threading/platform_thread.h"
15 #endif
16
17 namespace cc {
18
19 class ScopedResource : public Resource {
20 public:
21 static scoped_ptr<ScopedResource> Create(
22 ResourceProvider* resource_provider) {
23 return make_scoped_ptr(new ScopedResource(resource_provider));
24 }
25 virtual ~ScopedResource();
26
27 void Allocate(const gfx::Size& size,
28 ResourceProvider::TextureHint hint,
29 ResourceFormat format);
30 void AllocateManaged(const gfx::Size& size,
31 GLenum target,
32 ResourceFormat format);
33 void Free();
34
35 protected:
36 explicit ScopedResource(ResourceProvider* provider);
37
38 private:
39 ResourceProvider* resource_provider_;
40
41 #if DCHECK_IS_ON()
42 base::PlatformThreadId allocate_thread_id_;
43 #endif
44
45 DISALLOW_COPY_AND_ASSIGN(ScopedResource);
46 };
47
48 } // namespace cc
49
50 #endif // CC_RESOURCES_SCOPED_RESOURCE_H_
OLDNEW
« no previous file with comments | « cc/resources/returned_resource.h ('k') | cc/resources/scoped_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698