Chromium Code Reviews| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 92 static void DrawToTargetWithPathMask(GrTexture* texture, | 93 static void DrawToTargetWithPathMask(GrTexture* texture, |
| 93 GrDrawTarget* target, | 94 GrDrawTarget* target, |
| 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; |
|
robertphillips
2014/07/29 17:53:36
#if GR_COMPRESS_ALPHA_MASK ?
krajcevski
2014/07/29 17:59:35
Done.
| |
| 104 SkTextureCompressor::Format fCompressedFormat; | |
| 103 | 105 |
| 104 // Actually sends the texture data to the GPU. This is called from | 106 // Actually sends the texture data to the GPU. This is called from |
| 105 // toTexture with the data filled in depending on the texture config. | 107 // toTexture with the data filled in depending on the texture config. |
| 106 void sendTextureData(GrTexture *texture, const GrTextureDesc& desc, | 108 void sendTextureData(GrTexture *texture, const GrTextureDesc& desc, |
| 107 const void *data, int rowbytes); | 109 const void *data, int rowbytes); |
| 108 | 110 |
| 109 // Compresses the bitmap stored in fBM and sends the compressed data | 111 // Compresses the bitmap stored in fBM and sends the compressed data |
| 110 // to the GPU to be stored in 'texture' using sendTextureData. | 112 // to the GPU to be stored in 'texture' using sendTextureData. |
| 111 void compressTextureData(GrTexture *texture, const GrTextureDesc& desc); | 113 void compressTextureData(GrTexture *texture, const GrTextureDesc& desc); |
| 112 | 114 |
| 113 typedef SkNoncopyable INHERITED; | 115 typedef SkNoncopyable INHERITED; |
| 114 }; | 116 }; |
| 115 | 117 |
| 116 #endif // GrSWMaskHelper_DEFINED | 118 #endif // GrSWMaskHelper_DEFINED |
| OLD | NEW |