Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Side by Side Diff: ui/gfx/canvas.cc

Issue 1011683006: stop using deprecated SkPaint::FilterLevel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gfx/canvas.h" 5 #include "ui/gfx/canvas.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 625
626 skia::RefPtr<SkShader> shader = CreateImageRepShaderForScale( 626 skia::RefPtr<SkShader> shader = CreateImageRepShaderForScale(
627 image_rep, 627 image_rep,
628 SkShader::kRepeat_TileMode, 628 SkShader::kRepeat_TileMode,
629 shader_scale, 629 shader_scale,
630 pixel ? 1.0f : image_rep.scale()); 630 pixel ? 1.0f : image_rep.scale());
631 631
632 // Set up our paint to use the shader & release our reference (now just owned 632 // Set up our paint to use the shader & release our reference (now just owned
633 // by the paint). 633 // by the paint).
634 SkPaint p(paint); 634 SkPaint p(paint);
635 p.setFilterLevel(filter ? SkPaint::kLow_FilterLevel 635 p.setFilterQuality(filter ? kLow_SkFilterQuality : kNone_SkFilterQuality);
636 : SkPaint::kNone_FilterLevel);
637 p.setShader(shader.get()); 636 p.setShader(shader.get());
638 637
639 // The rect will be filled by the bitmap. 638 // The rect will be filled by the bitmap.
640 canvas_->drawRect(dest_rect, p); 639 canvas_->drawRect(dest_rect, p);
641 } 640 }
642 641
643 } // namespace gfx 642 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698