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

Unified Diff: chrome/browser/thumbnails/content_analysis_unittest.cc

Issue 2799213003: Remove deprecated functions from Canvas in favor of the RectF version. (Closed)
Patch Set: Fixed compile error in content_analysis_unittest Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/gfx/canvas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/thumbnails/content_analysis_unittest.cc
diff --git a/chrome/browser/thumbnails/content_analysis_unittest.cc b/chrome/browser/thumbnails/content_analysis_unittest.cc
index 6d44d14587926f3478cea4df98642276532a9024..0d8ddb42ce1d25e52beb4510e251ecf5b965dae7 100644
--- a/chrome/browser/thumbnails/content_analysis_unittest.cc
+++ b/chrome/browser/thumbnails/content_analysis_unittest.cc
@@ -129,7 +129,7 @@ TEST_F(ThumbnailContentAnalysisTest, ApplyGradientMagnitudeOnFrame) {
// The image consists of a single white block in the centre.
gfx::Rect draw_rect(300, 200, 200, 200);
canvas.FillRect(gfx::Rect(0, 0, 800, 600), SkColorSetRGB(0, 0, 0));
- canvas.DrawRect(draw_rect, SkColorSetRGB(255, 255, 255));
+ canvas.DrawRect(gfx::RectF(draw_rect), SkColorSetRGB(255, 255, 255));
Matt Giuca 2017/04/07 06:38:08 Don't cast the Rect to a RectF. Just change the ty
Uzair 2017/04/07 08:50:15 Done.
SkBitmap source = canvas.GetBitmap();
@@ -167,7 +167,7 @@ TEST_F(ThumbnailContentAnalysisTest, ExtractImageProfileInformation) {
gfx::Rect draw_rect(100, 100, 200, 100);
gfx::Rect image_rect(0, 0, 800, 600);
canvas.FillRect(image_rect, SkColorSetRGB(0, 0, 0));
- canvas.DrawRect(draw_rect, SkColorSetRGB(255, 255, 255));
+ canvas.DrawRect(gfx::RectF(draw_rect), SkColorSetRGB(255, 255, 255));
SkBitmap source = canvas.GetBitmap();
SkBitmap reduced_color;
@@ -229,8 +229,8 @@ TEST_F(ThumbnailContentAnalysisTest,
// single-pixel vertical gap in between.
gfx::Rect image_rect(0, 0, 800, 600);
canvas.FillRect(image_rect, SkColorSetRGB(0, 0, 0));
- canvas.DrawRect(gfx::Rect(300, 250, 99, 100), SkColorSetRGB(255, 255, 255));
- canvas.DrawRect(gfx::Rect(401, 250, 99, 100), SkColorSetRGB(255, 255, 255));
+ canvas.DrawRect(gfx::RectF(300, 250, 99, 100), SkColorSetRGB(255, 255, 255));
+ canvas.DrawRect(gfx::RectF(401, 250, 99, 100), SkColorSetRGB(255, 255, 255));
SkBitmap source = canvas.GetBitmap();
SkBitmap reduced_color;
@@ -621,7 +621,7 @@ TEST_F(ThumbnailContentAnalysisTest, CreateRetargetedThumbnailImage) {
for (int x = footer_rect.x() + fine_print;
x < footer_rect.right() - fine_print;
x += 2 * fine_print) {
- canvas.DrawRect(gfx::Rect(x, y, fine_print, fine_print), print_color);
+ canvas.DrawRect(gfx::RectF(x, y, fine_print, fine_print), print_color);
}
}
@@ -649,7 +649,7 @@ TEST_F(ThumbnailContentAnalysisTest, CreateRetargetedThumbnailImage) {
for (int x = body_rect.x() + fine_print;
x < body_rect.right() - fine_print;
x += 2 * fine_print) {
- canvas.DrawRect(gfx::Rect(x, y, fine_print, fine_print), print_color);
+ canvas.DrawRect(gfx::RecFt(x, y, fine_print, fine_print), print_color);
Matt Giuca 2017/04/07 06:38:08 RectF
Uzair 2017/04/07 08:50:15 Apologies for the mistake.
}
}
@@ -663,7 +663,7 @@ TEST_F(ThumbnailContentAnalysisTest, CreateRetargetedThumbnailImage) {
body_rect.width() / 2 - 2 * margin_vertical,
body_rect.height() / 3 - 2 * margin_vertical);
canvas.FillRect(pict_rect, SkColorSetRGB(255, 255, 255));
- canvas.DrawRect(pict_rect, SkColorSetRGB(0, 0, 0));
+ canvas.DrawRect(gfx::RectF(pict_rect), SkColorSetRGB(0, 0, 0));
}
SkBitmap source = canvas.GetBitmap();
« no previous file with comments | « no previous file | ui/gfx/canvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698