OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CC_TEST_TEST_TEXTURE_H_ | 5 #ifndef CC_TEST_TEST_TEXTURE_H_ |
6 #define CC_TEST_TEST_TEXTURE_H_ | 6 #define CC_TEST_TEST_TEXTURE_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "cc/resources/resource_format.h" | 10 #include "cc/resources/resource_format.h" |
11 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | 11 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
12 #include "ui/gfx/size.h" | 12 #include "ui/gfx/size.h" |
13 | 13 |
14 namespace cc { | 14 namespace cc { |
15 | 15 |
16 size_t TextureSizeBytes(gfx::Size size, ResourceFormat format); | 16 size_t TextureSizeBytes(gfx::Size size, ResourceFormat format); |
17 | 17 |
18 struct TestTexture : public base::RefCounted<TestTexture> { | 18 struct TestTexture : public base::RefCounted<TestTexture> { |
19 TestTexture(); | 19 TestTexture(); |
20 | 20 |
21 void Reallocate(gfx::Size size, ResourceFormat format); | 21 void Reallocate(gfx::Size size, ResourceFormat format); |
22 | 22 |
23 gfx::Size size; | 23 gfx::Size size; |
24 ResourceFormat format; | 24 ResourceFormat format; |
25 scoped_ptr<uint8_t[]> data; | 25 scoped_ptr<uint8_t[]> data; |
26 | 26 |
27 // TODO(mvujovic): Replace this with a hash map of texture parameter names | 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. | 28 // and values, which can hold this filter parameter value and more. |
29 WebKit::WGC3Denum filter; | 29 blink::WGC3Denum filter; |
30 | 30 |
31 private: | 31 private: |
32 friend class base::RefCounted<TestTexture>; | 32 friend class base::RefCounted<TestTexture>; |
33 ~TestTexture(); | 33 ~TestTexture(); |
34 }; | 34 }; |
35 | 35 |
36 } // namespace cc | 36 } // namespace cc |
37 | 37 |
38 #endif // CC_TEST_TEST_TEXTURE_H_ | 38 #endif // CC_TEST_TEST_TEXTURE_H_ |
OLD | NEW |