Run WebGL conformance tests on Android GPU bot
[chromium-blink-merge.git] / cc / debug / test_texture.h
blob301c3a4251c7e60f103eb11b3e8bb522590abae4
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 #include "base/memory/ref_counted.h"
6 #include "base/memory/scoped_ptr.h"
7 #include "cc/base/cc_export.h"
8 #include "cc/resources/resource_format.h"
9 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
10 #include "ui/gfx/rect.h"
12 #ifndef CC_DEBUG_TEST_TEXTURE_H_
13 #define CC_DEBUG_TEST_TEXTURE_H_
15 namespace cc {
17 size_t CC_EXPORT TextureSizeBytes(gfx::Size size, ResourceFormat format);
19 struct CC_EXPORT TestTexture : public base::RefCounted<TestTexture> {
20 TestTexture();
22 void Reallocate(gfx::Size size, ResourceFormat format);
24 gfx::Size size;
25 ResourceFormat format;
26 scoped_ptr<uint8_t[]> data;
28 // TODO(mvujovic): Replace this with a hash map of texture parameter names
29 // and values, which can hold this filter parameter value and more.
30 WebKit::WGC3Denum filter;
32 private:
33 friend class base::RefCounted<TestTexture>;
34 ~TestTexture();
37 } // namespace cc
39 #endif // CC_DEBUG_TEST_TEXTURE_H_