| 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 #include "GrSWMaskHelper.h" | 8 #include "GrSWMaskHelper.h" |
| 9 | 9 |
| 10 #include "GrPipelineBuilder.h" | 10 #include "GrPipelineBuilder.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 default: | 60 default: |
| 61 SkDEBUGFAIL("No GrPixelConfig for compression format!"); | 61 SkDEBUGFAIL("No GrPixelConfig for compression format!"); |
| 62 // Best guess | 62 // Best guess |
| 63 config = kAlpha_8_GrPixelConfig; | 63 config = kAlpha_8_GrPixelConfig; |
| 64 break; | 64 break; |
| 65 } | 65 } |
| 66 | 66 |
| 67 return config; | 67 return config; |
| 68 } | 68 } |
| 69 | 69 |
| 70 static bool choose_compressed_fmt(const GrDrawTargetCaps* caps, | 70 static bool choose_compressed_fmt(const GrCaps* caps, |
| 71 SkTextureCompressor::Format *fmt) { | 71 SkTextureCompressor::Format *fmt) { |
| 72 if (NULL == fmt) { | 72 if (NULL == fmt) { |
| 73 return false; | 73 return false; |
| 74 } | 74 } |
| 75 | 75 |
| 76 // We can't use scratch textures without the ability to update | 76 // We can't use scratch textures without the ability to update |
| 77 // compressed textures... | 77 // compressed textures... |
| 78 if (!(caps->compressedTexSubImageSupport())) { | 78 if (!(caps->compressedTexSubImageSupport())) { |
| 79 return false; | 79 return false; |
| 80 } | 80 } |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 maskMatrix.preTranslate(SkIntToScalar(-rect.fLeft), SkIntToScalar(-rect.fTop
)); | 371 maskMatrix.preTranslate(SkIntToScalar(-rect.fLeft), SkIntToScalar(-rect.fTop
)); |
| 372 | 372 |
| 373 pipelineBuilder->addCoverageProcessor( | 373 pipelineBuilder->addCoverageProcessor( |
| 374 GrSimpleTextureEffect::Create(texture, | 374 GrSimpleTextureEffect::Create(texture, |
| 375 maskMatrix, | 375 maskMatrix, |
| 376 GrTextureParams::kNone_Fi
lterMode, | 376 GrTextureParams::kNone_Fi
lterMode, |
| 377 kDevice_GrCoordSet))->unr
ef(); | 377 kDevice_GrCoordSet))->unr
ef(); |
| 378 | 378 |
| 379 target->drawRect(pipelineBuilder, color, SkMatrix::I(), dstRect, NULL, &inve
rt); | 379 target->drawRect(pipelineBuilder, color, SkMatrix::I(), dstRect, NULL, &inve
rt); |
| 380 } | 380 } |
| OLD | NEW |