1 // Copyright 2013 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 CC_TEST_TEST_TEXTURE_H_
6 #define CC_TEST_TEST_TEXTURE_H_
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "cc/resources/resource_format.h"
11 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
12 #include "ui/gfx/size.h"
16 size_t TextureSizeBytes(gfx::Size size, ResourceFormat format);
18 struct TestTexture : public base::RefCounted<TestTexture> {
21 void Reallocate(gfx::Size size, ResourceFormat format);
24 ResourceFormat format;
25 scoped_ptr<uint8_t[]> data;
27 // TODO(mvujovic): Replace this with a hash map of texture parameter names
28 // and values, which can hold this filter parameter value and more.
29 WebKit::WGC3Denum filter;
32 friend class base::RefCounted<TestTexture>;
38 #endif // CC_TEST_TEST_TEXTURE_H_