- add sources.
[platform/framework/web/crosswalk.git] / src / cc / test / test_texture.h
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.
4
5 #ifndef CC_TEST_TEST_TEXTURE_H_
6 #define CC_TEST_TEST_TEXTURE_H_
7
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"
13
14 namespace cc {
15
16 size_t TextureSizeBytes(gfx::Size size, ResourceFormat format);
17
18 struct TestTexture : public base::RefCounted<TestTexture> {
19   TestTexture();
20
21   void Reallocate(gfx::Size size, ResourceFormat format);
22
23   gfx::Size size;
24   ResourceFormat format;
25   scoped_ptr<uint8_t[]> data;
26
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;
30
31  private:
32   friend class base::RefCounted<TestTexture>;
33   ~TestTexture();
34 };
35
36 }  // namespace cc
37
38 #endif  // CC_TEST_TEST_TEXTURE_H_