| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "SkMaskFilter.h" | 10 #include "SkMaskFilter.h" |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 } | 310 } |
| 311 | 311 |
| 312 bool SkMaskFilter::directFilterMaskGPU(GrContext* context, | 312 bool SkMaskFilter::directFilterMaskGPU(GrContext* context, |
| 313 GrPaint* grp, | 313 GrPaint* grp, |
| 314 const SkStrokeRec& strokeRec, | 314 const SkStrokeRec& strokeRec, |
| 315 const SkPath& path) const { | 315 const SkPath& path) const { |
| 316 return false; | 316 return false; |
| 317 } | 317 } |
| 318 | 318 |
| 319 | 319 |
| 320 bool SkMaskFilter::directFilterRRectMaskGPU(GrContext* context, |
| 321 GrPaint* grp, |
| 322 const SkStrokeRec& strokeRec, |
| 323 const SkRRect& rrect) const { |
| 324 return false; |
| 325 } |
| 326 |
| 320 bool SkMaskFilter::filterMaskGPU(GrTexture* src, | 327 bool SkMaskFilter::filterMaskGPU(GrTexture* src, |
| 321 const SkMatrix& ctm, | 328 const SkMatrix& ctm, |
| 322 const SkRect& maskRect, | 329 const SkRect& maskRect, |
| 323 GrTexture** result, | 330 GrTexture** result, |
| 324 bool canOverwriteSrc) const { | 331 bool canOverwriteSrc) const { |
| 325 return false; | 332 return false; |
| 326 } | 333 } |
| 327 #endif | 334 #endif |
| 328 | 335 |
| 329 void SkMaskFilter::computeFastBounds(const SkRect& src, SkRect* dst) const { | 336 void SkMaskFilter::computeFastBounds(const SkRect& src, SkRect* dst) const { |
| 330 SkMask srcM, dstM; | 337 SkMask srcM, dstM; |
| 331 | 338 |
| 332 srcM.fImage = NULL; | 339 srcM.fImage = NULL; |
| 333 src.roundOut(&srcM.fBounds); | 340 src.roundOut(&srcM.fBounds); |
| 334 srcM.fRowBytes = 0; | 341 srcM.fRowBytes = 0; |
| 335 srcM.fFormat = SkMask::kA8_Format; | 342 srcM.fFormat = SkMask::kA8_Format; |
| 336 | 343 |
| 337 SkIPoint margin; // ignored | 344 SkIPoint margin; // ignored |
| 338 if (this->filterMask(&dstM, srcM, SkMatrix::I(), &margin)) { | 345 if (this->filterMask(&dstM, srcM, SkMatrix::I(), &margin)) { |
| 339 dst->set(dstM.fBounds); | 346 dst->set(dstM.fBounds); |
| 340 } else { | 347 } else { |
| 341 dst->set(srcM.fBounds); | 348 dst->set(srcM.fBounds); |
| 342 } | 349 } |
| 343 } | 350 } |
| OLD | NEW |