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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 REPORTER_ASSERT(reporter, !success); | 549 REPORTER_ASSERT(reporter, !success); |
550 } | 550 } |
551 } | 551 } |
552 } | 552 } |
553 } | 553 } |
554 | 554 |
555 #if SK_SUPPORT_GPU | 555 #if SK_SUPPORT_GPU |
556 | 556 |
557 // This exercises the problem discovered in crbug.com/570232. The return value f
rom | 557 // This exercises the problem discovered in crbug.com/570232. The return value f
rom |
558 // SkBlurMask::BoxBlur wasn't being checked in SkBlurMaskFilter.cpp::GrRRectBlur
Effect::Create | 558 // SkBlurMask::BoxBlur wasn't being checked in SkBlurMaskFilter.cpp::GrRRectBlur
Effect::Create |
559 DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SmallBoxBlurBug, reporter, ctxInfo) { | 559 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SmallBoxBlurBug, reporter, ctxInfo) { |
560 | 560 |
561 SkImageInfo info = SkImageInfo::MakeN32Premul(128, 128); | 561 SkImageInfo info = SkImageInfo::MakeN32Premul(128, 128); |
562 auto surface(SkSurface::MakeRenderTarget(ctxInfo.grContext(), SkBudgeted::kN
o, info)); | 562 auto surface(SkSurface::MakeRenderTarget(ctxInfo.grContext(), SkBudgeted::kN
o, info)); |
563 SkCanvas* canvas = surface->getCanvas(); | 563 SkCanvas* canvas = surface->getCanvas(); |
564 | 564 |
565 SkRect r = SkRect::MakeXYWH(10, 10, 100, 100); | 565 SkRect r = SkRect::MakeXYWH(10, 10, 100, 100); |
566 SkRRect rr = SkRRect::MakeRectXY(r, 10, 10); | 566 SkRRect rr = SkRRect::MakeRectXY(r, 10, 10); |
567 | 567 |
568 SkPaint p; | 568 SkPaint p; |
569 p.setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, 0.01f)); | 569 p.setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, 0.01f)); |
570 | 570 |
571 canvas->drawRRect(rr, p); | 571 canvas->drawRRect(rr, p); |
572 } | 572 } |
573 | 573 |
574 #endif | 574 #endif |
575 | 575 |
576 ////////////////////////////////////////////////////////////////////////////////
/////////// | 576 ////////////////////////////////////////////////////////////////////////////////
/////////// |
OLD | NEW |