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
11 #include <wtf/MainThread.h>
16 class CCScopedTexture
: protected CCTexture
{
17 WTF_MAKE_NONCOPYABLE(CCScopedTexture
);
19 static PassOwnPtr
<CCScopedTexture
> create(CCResourceProvider
* resourceProvider
) { return adoptPtr(new CCScopedTexture(resourceProvider
)); }
20 virtual ~CCScopedTexture();
23 using CCTexture::size
;
24 using CCTexture::format
;
25 using CCTexture::bytes
;
27 bool allocate(int pool
, const IntSize
&, GC3Denum format
, CCResourceProvider::TextureUsageHint
);
32 explicit CCScopedTexture(CCResourceProvider
*);
35 CCResourceProvider
* m_resourceProvider
;
38 ThreadIdentifier m_allocateThreadIdentifier
;