// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CC_TEST_TEST_TEXTURE_H_ #define CC_TEST_TEST_TEXTURE_H_ #include #include #include #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "cc/resources/resource_format.h" #include "third_party/khronos/GLES2/gl2.h" #include "ui/gfx/geometry/size.h" namespace cc { size_t TextureSizeBytes(const gfx::Size& size, ResourceFormat format); struct TestTexture : public base::RefCounted { TestTexture(); void Reallocate(const gfx::Size& size, ResourceFormat format); bool IsValidParameter(GLenum pname); gfx::Size size; ResourceFormat format; scoped_ptr data; using TextureParametersMap = std::unordered_map; TextureParametersMap params; private: friend class base::RefCounted; ~TestTexture(); }; } // namespace cc #endif // CC_TEST_TEST_TEXTURE_H_