Chromium Code Reviews| Index: skia/ext/texture_handle.h |
| diff --git a/skia/ext/texture_handle.h b/skia/ext/texture_handle.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b399d41aad7c4d6307b72b0fbfe1f49c4a70ead2 |
| --- /dev/null |
| +++ b/skia/ext/texture_handle.h |
| @@ -0,0 +1,25 @@ |
| +// Copyright 2016 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 SKIA_EXT_TEXTURE_HANDLE_H_ |
| +#define SKIA_EXT_TEXTURE_HANDLE_H_ |
| + |
| +#include "third_party/skia/include/gpu/gl/GrGLTypes.h" |
| + |
| +namespace skia { |
| + |
| +// TODO(bsalomon): Remove both of these conversions when Skia bug 5019 is fixed. |
| +static inline GrBackendObject GrGLTextureInfoToGrBackendObject( |
|
DaleCurtis
2016/02/26 20:43:16
static inline in a header file seems unusual.
|
| + const GrGLTextureInfo& info) { |
| + return reinterpret_cast<GrBackendObject>(&info); |
| +} |
| + |
| +static inline const GrGLTextureInfo* GrBackendObjectToGrGLTextureInfo( |
| + GrBackendObject object) { |
| + return reinterpret_cast<const GrGLTextureInfo*>(object); |
| +} |
| + |
| +} // namespace skia |
| + |
| +#endif // SKIA_EXT_TEXTURE_HANDLE_H_ |