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

Side by Side Diff: skia/ext/analysis_canvas_unittest.cc

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « skia/ext/analysis_canvas.cc ('k') | skia/ext/image_operations.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/compiler_specific.h" 5 #include "base/compiler_specific.h"
6 #include "skia/ext/analysis_canvas.h" 6 #include "skia/ext/analysis_canvas.h"
7 #include "skia/ext/refptr.h" 7 #include "skia/ext/refptr.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "third_party/skia/include/core/SkPicture.h" 9 #include "third_party/skia/include/core/SkPicture.h"
10 #include "third_party/skia/include/core/SkPictureRecorder.h" 10 #include "third_party/skia/include/core/SkPictureRecorder.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 skia::AnalysisCanvas canvas(255, 255); 71 skia::AnalysisCanvas canvas(255, 255);
72 72
73 // Draw paint test. 73 // Draw paint test.
74 SkColor color = SkColorSetARGB(255, 11, 22, 33); 74 SkColor color = SkColorSetARGB(255, 11, 22, 33);
75 SkPaint paint; 75 SkPaint paint;
76 paint.setColor(color); 76 paint.setColor(color);
77 77
78 canvas.drawPaint(paint); 78 canvas.drawPaint(paint);
79 79
80 SkColor outputColor; 80 SkColor outputColor;
81 //TODO(vmpstr): This should return true. (crbug.com/180597) 81 EXPECT_TRUE(canvas.GetColorIfSolid(&outputColor));
82 EXPECT_FALSE(canvas.GetColorIfSolid(&outputColor));
83 82
84 // Draw points test. 83 // Draw points test.
85 SkPoint points[4] = { 84 SkPoint points[4] = {
86 SkPoint::Make(0, 0), 85 SkPoint::Make(0, 0),
87 SkPoint::Make(255, 0), 86 SkPoint::Make(255, 0),
88 SkPoint::Make(255, 255), 87 SkPoint::Make(255, 255),
89 SkPoint::Make(0, 255) 88 SkPoint::Make(0, 255)
90 }; 89 };
91 90
92 SolidColorFill(canvas); 91 SolidColorFill(canvas);
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 EXPECT_FALSE(canvas.GetColorIfSolid(&outputColor)); 346 EXPECT_FALSE(canvas.GetColorIfSolid(&outputColor));
348 347
349 canvas.restore(); 348 canvas.restore();
350 EXPECT_FALSE(canvas.GetColorIfSolid(&outputColor)); 349 EXPECT_FALSE(canvas.GetColorIfSolid(&outputColor));
351 350
352 SolidColorFill(canvas); 351 SolidColorFill(canvas);
353 EXPECT_FALSE(canvas.GetColorIfSolid(&outputColor)); 352 EXPECT_FALSE(canvas.GetColorIfSolid(&outputColor));
354 } 353 }
355 354
356 } // namespace skia 355 } // namespace skia
OLDNEW
« no previous file with comments | « skia/ext/analysis_canvas.cc ('k') | skia/ext/image_operations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698