Allan MacKinnon | 4359d52 | 2018-06-19 13:57:04 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 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 | |
| 8 | #ifndef SkSurface_Image_DEFINED |
| 9 | #define SkSurface_Image_DEFINED |
| 10 | |
| 11 | // |
| 12 | // for now make sure it's defined |
| 13 | // |
| 14 | |
| 15 | #if !defined(SK_SUPPORT_GPU_COMPUTE) |
| 16 | #define SK_SUPPORT_GPU_COMPUTE 1 |
| 17 | #endif |
| 18 | |
| 19 | // |
| 20 | // |
| 21 | // |
| 22 | |
| 23 | #if SK_SUPPORT_GPU_COMPUTE |
| 24 | |
| 25 | // |
| 26 | // |
| 27 | // |
| 28 | |
| 29 | // #include "GrContext.h" |
| 30 | // #include "SkRefCnt.h" |
| 31 | #include "SkImage.h" |
| 32 | #include "gl/GrGLGpu.h" |
| 33 | |
| 34 | // |
| 35 | // |
| 36 | // |
| 37 | |
| 38 | #include "SkContext_Compute.h" |
| 39 | |
| 40 | // |
| 41 | // |
| 42 | // |
| 43 | |
| 44 | class SkImage_Compute : public SkImage |
| 45 | { |
| 46 | public: |
| 47 | |
| 48 | SkImage_Compute(sk_sp<SkContext_Compute> compute, |
| 49 | GrGLuint const snap, |
| 50 | int const width, |
| 51 | int const height); |
| 52 | |
| 53 | ~SkImage_Compute(); |
| 54 | |
| 55 | // |
| 56 | // |
| 57 | // |
| 58 | |
| 59 | private: |
| 60 | |
| 61 | // |
| 62 | // |
| 63 | // |
| 64 | |
| 65 | sk_sp<SkContext_Compute> compute; // reference to compute context |
| 66 | GrGLuint snap; // fbo |
| 67 | |
| 68 | // |
| 69 | // |
| 70 | // |
| 71 | }; |
| 72 | |
| 73 | // |
| 74 | // |
| 75 | // |
| 76 | |
| 77 | #endif |
| 78 | |
| 79 | // |
| 80 | // |
| 81 | // |
| 82 | |
| 83 | #endif |