| 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 return false; | 302 return false; |
| 303 } | 303 } |
| 304 | 304 |
| 305 bool SkMaskFilter::canFilterMaskGPU(const SkRect& devBounds, | 305 bool SkMaskFilter::canFilterMaskGPU(const SkRect& devBounds, |
| 306 const SkIRect& clipBounds, | 306 const SkIRect& clipBounds, |
| 307 const SkMatrix& ctm, | 307 const SkMatrix& ctm, |
| 308 SkRect* maskRect) const { | 308 SkRect* maskRect) const { |
| 309 return false; | 309 return false; |
| 310 } | 310 } |
| 311 | 311 |
| 312 bool SkMaskFilter::directFilterMaskGPU(GrContext* context, |
| 313 GrPaint* grp, |
| 314 const SkStrokeRec& strokeRec, |
| 315 const SkPath& path) const { |
| 316 return false; |
| 317 } |
| 318 |
| 312 | 319 |
| 313 bool SkMaskFilter::filterMaskGPU(GrTexture* src, | 320 bool SkMaskFilter::filterMaskGPU(GrTexture* src, |
| 314 const SkMatrix& ctm, | 321 const SkMatrix& ctm, |
| 315 const SkRect& maskRect, | 322 const SkRect& maskRect, |
| 316 GrTexture** result, | 323 GrTexture** result, |
| 317 bool canOverwriteSrc) const { | 324 bool canOverwriteSrc) const { |
| 318 return false; | 325 return false; |
| 319 } | 326 } |
| 320 #endif | 327 #endif |
| 321 | 328 |
| 322 void SkMaskFilter::computeFastBounds(const SkRect& src, SkRect* dst) const { | 329 void SkMaskFilter::computeFastBounds(const SkRect& src, SkRect* dst) const { |
| 323 SkMask srcM, dstM; | 330 SkMask srcM, dstM; |
| 324 | 331 |
| 325 srcM.fImage = NULL; | 332 srcM.fImage = NULL; |
| 326 src.roundOut(&srcM.fBounds); | 333 src.roundOut(&srcM.fBounds); |
| 327 srcM.fRowBytes = 0; | 334 srcM.fRowBytes = 0; |
| 328 srcM.fFormat = SkMask::kA8_Format; | 335 srcM.fFormat = SkMask::kA8_Format; |
| 329 | 336 |
| 330 SkIPoint margin; // ignored | 337 SkIPoint margin; // ignored |
| 331 if (this->filterMask(&dstM, srcM, SkMatrix::I(), &margin)) { | 338 if (this->filterMask(&dstM, srcM, SkMatrix::I(), &margin)) { |
| 332 dst->set(dstM.fBounds); | 339 dst->set(dstM.fBounds); |
| 333 } else { | 340 } else { |
| 334 dst->set(srcM.fBounds); | 341 dst->set(srcM.fBounds); |
| 335 } | 342 } |
| 336 } | 343 } |
| OLD | NEW |