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

Side by Side Diff: content/renderer/media/android/webmediaplayer_android.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/media/android/webmediaplayer_android.h" 5 #include "content/renderer/media/android/webmediaplayer_android.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 1122
1123 // Create the canvas and draw the "Casting to <Chromecast>" text on it. 1123 // Create the canvas and draw the "Casting to <Chromecast>" text on it.
1124 SkCanvas canvas(bitmap); 1124 SkCanvas canvas(bitmap);
1125 canvas.drawColor(SK_ColorBLACK); 1125 canvas.drawColor(SK_ColorBLACK);
1126 1126
1127 const SkScalar kTextSize(40); 1127 const SkScalar kTextSize(40);
1128 const SkScalar kMinPadding(40); 1128 const SkScalar kMinPadding(40);
1129 1129
1130 SkPaint paint; 1130 SkPaint paint;
1131 paint.setAntiAlias(true); 1131 paint.setAntiAlias(true);
1132 paint.setFilterLevel(SkPaint::kHigh_FilterLevel); 1132 paint.setFilterQuality(kHigh_SkFilterQuality);
1133 paint.setColor(SK_ColorWHITE); 1133 paint.setColor(SK_ColorWHITE);
1134 paint.setTypeface(SkTypeface::CreateFromName("sans", SkTypeface::kBold)); 1134 paint.setTypeface(SkTypeface::CreateFromName("sans", SkTypeface::kBold));
1135 paint.setTextSize(kTextSize); 1135 paint.setTextSize(kTextSize);
1136 1136
1137 // Calculate the vertical margin from the top 1137 // Calculate the vertical margin from the top
1138 SkPaint::FontMetrics font_metrics; 1138 SkPaint::FontMetrics font_metrics;
1139 paint.getFontMetrics(&font_metrics); 1139 paint.getFontMetrics(&font_metrics);
1140 SkScalar sk_vertical_margin = kMinPadding - font_metrics.fAscent; 1140 SkScalar sk_vertical_margin = kMinPadding - font_metrics.fAscent;
1141 1141
1142 // Measure the width of the entire text to display 1142 // Measure the width of the entire text to display
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
1857 1857
1858 bool WebMediaPlayerAndroid::IsHLSStream() const { 1858 bool WebMediaPlayerAndroid::IsHLSStream() const {
1859 std::string mime; 1859 std::string mime;
1860 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_; 1860 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_;
1861 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime)) 1861 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime))
1862 return false; 1862 return false;
1863 return !mime.compare("application/x-mpegurl"); 1863 return !mime.compare("application/x-mpegurl");
1864 } 1864 }
1865 1865
1866 } // namespace content 1866 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698