| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef GrSWMaskHelper_DEFINED | 8 #ifndef GrSWMaskHelper_DEFINED |
| 9 #define GrSWMaskHelper_DEFINED | 9 #define GrSWMaskHelper_DEFINED |
| 10 | 10 |
| 11 #include "GrColor.h" | 11 #include "GrColor.h" |
| 12 #include "GrDrawState.h" | 12 #include "GrDrawState.h" |
| 13 #include "SkBitmap.h" | 13 #include "SkBitmap.h" |
| 14 #include "SkDraw.h" | 14 #include "SkDraw.h" |
| 15 #include "SkMatrix.h" | 15 #include "SkMatrix.h" |
| 16 #include "SkRasterClip.h" | 16 #include "SkRasterClip.h" |
| 17 #include "SkRegion.h" | 17 #include "SkRegion.h" |
| 18 #include "SkTextureCompressor.h" |
| 18 #include "SkTypes.h" | 19 #include "SkTypes.h" |
| 19 | 20 |
| 20 class GrAutoScratchTexture; | 21 class GrAutoScratchTexture; |
| 21 class GrContext; | 22 class GrContext; |
| 22 class GrTexture; | 23 class GrTexture; |
| 23 class SkPath; | 24 class SkPath; |
| 24 class SkStrokeRec; | 25 class SkStrokeRec; |
| 25 class GrDrawTarget; | 26 class GrDrawTarget; |
| 26 | 27 |
| 27 /** | 28 /** |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 const SkIRect& rect); | 95 const SkIRect& rect); |
| 95 | 96 |
| 96 protected: | 97 protected: |
| 97 private: | 98 private: |
| 98 GrContext* fContext; | 99 GrContext* fContext; |
| 99 SkMatrix fMatrix; | 100 SkMatrix fMatrix; |
| 100 SkBitmap fBM; | 101 SkBitmap fBM; |
| 101 SkDraw fDraw; | 102 SkDraw fDraw; |
| 102 SkRasterClip fRasterClip; | 103 SkRasterClip fRasterClip; |
| 103 | 104 |
| 105 #if GR_COMPRESS_ALPHA_MASK |
| 106 SkTextureCompressor::Format fCompressedFormat; |
| 107 #endif |
| 108 |
| 104 // Actually sends the texture data to the GPU. This is called from | 109 // Actually sends the texture data to the GPU. This is called from |
| 105 // toTexture with the data filled in depending on the texture config. | 110 // toTexture with the data filled in depending on the texture config. |
| 106 void sendTextureData(GrTexture *texture, const GrTextureDesc& desc, | 111 void sendTextureData(GrTexture *texture, const GrTextureDesc& desc, |
| 107 const void *data, int rowbytes); | 112 const void *data, int rowbytes); |
| 108 | 113 |
| 109 // Compresses the bitmap stored in fBM and sends the compressed data | 114 // Compresses the bitmap stored in fBM and sends the compressed data |
| 110 // to the GPU to be stored in 'texture' using sendTextureData. | 115 // to the GPU to be stored in 'texture' using sendTextureData. |
| 111 void compressTextureData(GrTexture *texture, const GrTextureDesc& desc); | 116 void compressTextureData(GrTexture *texture, const GrTextureDesc& desc); |
| 112 | 117 |
| 113 typedef SkNoncopyable INHERITED; | 118 typedef SkNoncopyable INHERITED; |
| 114 }; | 119 }; |
| 115 | 120 |
| 116 #endif // GrSWMaskHelper_DEFINED | 121 #endif // GrSWMaskHelper_DEFINED |
| OLD | NEW |