| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "SkBlurMask.h" | 8 #include "SkBlurMask.h" |
| 9 #include "SkBlurMaskFilter.h" | 9 #include "SkBlurMaskFilter.h" |
| 10 #include "SkBlurDrawLooper.h" | 10 #include "SkBlurDrawLooper.h" |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 } | 558 } |
| 559 } | 559 } |
| 560 | 560 |
| 561 #if SK_SUPPORT_GPU | 561 #if SK_SUPPORT_GPU |
| 562 | 562 |
| 563 // This exercises the problem discovered in crbug.com/570232. The return value f
rom | 563 // This exercises the problem discovered in crbug.com/570232. The return value f
rom |
| 564 // SkBlurMask::BoxBlur wasn't being checked in SkBlurMaskFilter.cpp::GrRRectBlur
Effect::Create | 564 // SkBlurMask::BoxBlur wasn't being checked in SkBlurMaskFilter.cpp::GrRRectBlur
Effect::Create |
| 565 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SmallBoxBlurBug, reporter, ctx) { | 565 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SmallBoxBlurBug, reporter, ctx) { |
| 566 | 566 |
| 567 SkImageInfo info = SkImageInfo::MakeN32Premul(128, 128); | 567 SkImageInfo info = SkImageInfo::MakeN32Premul(128, 128); |
| 568 SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTarget(ctx, SkBudgeted::
kNo, info)); | 568 SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTarget(ctx, SkSurface::k
No_Budgeted, info)); |
| 569 SkCanvas* canvas = surface->getCanvas(); | 569 SkCanvas* canvas = surface->getCanvas(); |
| 570 | 570 |
| 571 SkRect r = SkRect::MakeXYWH(10, 10, 100, 100); | 571 SkRect r = SkRect::MakeXYWH(10, 10, 100, 100); |
| 572 SkRRect rr = SkRRect::MakeRectXY(r, 10, 10); | 572 SkRRect rr = SkRRect::MakeRectXY(r, 10, 10); |
| 573 | 573 |
| 574 SkPaint p; | 574 SkPaint p; |
| 575 p.setMaskFilter(SkBlurMaskFilter::Create(kNormal_SkBlurStyle, 0.01f))->unref
(); | 575 p.setMaskFilter(SkBlurMaskFilter::Create(kNormal_SkBlurStyle, 0.01f))->unref
(); |
| 576 | 576 |
| 577 canvas->drawRRect(rr, p); | 577 canvas->drawRRect(rr, p); |
| 578 } | 578 } |
| 579 | 579 |
| 580 #endif | 580 #endif |
| 581 | 581 |
| 582 ////////////////////////////////////////////////////////////////////////////////
/////////// | 582 ////////////////////////////////////////////////////////////////////////////////
/////////// |
| OLD | NEW |