Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright 2015 Google Inc. | |
| 3 * | |
| 4 * Use of this source code is governed by a BSD-style license that can be | |
| 5 * found in the LICENSE file. | |
| 6 */ | |
| 7 | |
|
robertphillips
2015/09/04 15:20:54
GrYUVProvider_DEFINED ?
reed1
2015/09/04 15:31:05
Done.
| |
| 8 #ifndef GrYUVScoper_DEFINED | |
| 9 #define GrYUVScoper_DEFINED | |
| 10 | |
| 11 #include "GrTypes.h" | |
| 12 #include "SkImageInfo.h" | |
| 13 | |
| 14 class GrContext; | |
| 15 class GrTexture; | |
| 16 | |
| 17 class GrYUVProvider { | |
| 18 public: | |
| 19 virtual ~GrYUVProvider() {} | |
| 20 | |
| 21 GrTexture* refAsTexture(GrContext*, const GrSurfaceDesc&, bool useCache); | |
| 22 | |
| 23 virtual uint32_t onGetID() = 0; | |
| 24 | |
| 25 enum { | |
| 26 kY_Index = 0, | |
| 27 kU_Index = 1, | |
| 28 kV_Index = 2, | |
| 29 | |
| 30 kPlaneCount = 3 | |
| 31 }; | |
| 32 | |
| 33 virtual bool onGetYUVSizes(SkISize sizes[kPlaneCount]) = 0; | |
| 34 virtual bool onGetYUVPlanes(SkISize sizes[kPlaneCount], void* planes[kPlaneC ount], | |
| 35 size_t rowBytes[kPlaneCount], SkYUVColorSpace*) = 0; | |
| 36 }; | |
| 37 | |
| 38 #endif | |
| OLD | NEW |