OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 MOJO_SKIA_GANESH_HELPERS_H_ |
| 6 #define MOJO_SKIA_GANESH_HELPERS_H_ |
| 7 |
| 8 #include "base/callback.h" |
| 9 #include "mojo/skia/ganesh_context.h" |
| 10 #include "skia/ext/refptr.h" |
| 11 |
| 12 class SkImage; |
| 13 |
| 14 namespace mojo { |
| 15 namespace skia { |
| 16 |
| 17 // Creates a Skia image from a GL texture. |
| 18 // The underlying texture must be kept alive for as long as the SkImage exists. |
| 19 // Invokes |release_callback| when the SkImage is deleted. |
| 20 ::skia::RefPtr<SkImage> CreateImageFromTexture( |
| 21 GaneshContext* context, |
| 22 uint32_t texture_id, |
| 23 uint32_t width, |
| 24 uint32_t height, |
| 25 const base::Closure& release_callback); |
| 26 |
| 27 } // namespace skia |
| 28 } // namespace mojo |
| 29 |
| 30 #endif // MOJO_SKIA_GANESH_HELPERS_H_ |
OLD | NEW |