app_list: Update separator color.
[chromium-blink-merge.git] / cc / CCScopedTexture.h
blobc82b8bc8e3ba36db821fd1da5a6b8ae08eaa8c3e
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.
5 #ifndef CCScopedTexture_h
6 #define CCScopedTexture_h
8 #include "CCTexture.h"
10 #if !ASSERT_DISABLED
11 #include <wtf/MainThread.h>
12 #endif
14 namespace WebCore {
16 class CCScopedTexture : protected CCTexture {
17 WTF_MAKE_NONCOPYABLE(CCScopedTexture);
18 public:
19 static PassOwnPtr<CCScopedTexture> create(CCResourceProvider* resourceProvider) { return adoptPtr(new CCScopedTexture(resourceProvider)); }
20 virtual ~CCScopedTexture();
22 using CCTexture::id;
23 using CCTexture::size;
24 using CCTexture::format;
25 using CCTexture::bytes;
27 bool allocate(int pool, const IntSize&, GC3Denum format, CCResourceProvider::TextureUsageHint);
28 void free();
29 void leak();
31 protected:
32 explicit CCScopedTexture(CCResourceProvider*);
34 private:
35 CCResourceProvider* m_resourceProvider;
37 #if !ASSERT_DISABLED
38 ThreadIdentifier m_allocateThreadIdentifier;
39 #endif
44 #endif