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

Side by Side Diff: tests/PictureBBHTest.cpp

Issue 1037793002: C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: git cl web 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
« no previous file with comments | « tests/PathOpsThreadedCommon.h ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkBBoxHierarchy.h" 9 #include "SkBBoxHierarchy.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 }; 55 };
56 56
57 // Test to verify the playback of an empty picture 57 // Test to verify the playback of an empty picture
58 // 58 //
59 class DrawEmptyPictureBBHTest : public PictureBBHTestBase { 59 class DrawEmptyPictureBBHTest : public PictureBBHTestBase {
60 public: 60 public:
61 DrawEmptyPictureBBHTest() 61 DrawEmptyPictureBBHTest()
62 : PictureBBHTestBase(2, 2, 1, 1) { } 62 : PictureBBHTestBase(2, 2, 1, 1) { }
63 virtual ~DrawEmptyPictureBBHTest() { } 63 virtual ~DrawEmptyPictureBBHTest() { }
64 64
65 void doTest(SkCanvas&, SkCanvas&) SK_OVERRIDE { } 65 void doTest(SkCanvas&, SkCanvas&) override { }
66 }; 66 };
67 67
68 // Test to verify the playback of a picture into a canvas that has 68 // Test to verify the playback of a picture into a canvas that has
69 // an empty clip. 69 // an empty clip.
70 // 70 //
71 class EmptyClipPictureBBHTest : public PictureBBHTestBase { 71 class EmptyClipPictureBBHTest : public PictureBBHTestBase {
72 public: 72 public:
73 EmptyClipPictureBBHTest() 73 EmptyClipPictureBBHTest()
74 : PictureBBHTestBase(2, 2, 3, 3) { } 74 : PictureBBHTestBase(2, 2, 3, 3) { }
75 75
76 void doTest(SkCanvas& playbackCanvas, SkCanvas& recordingCanvas) SK_OVERRIDE { 76 void doTest(SkCanvas& playbackCanvas, SkCanvas& recordingCanvas) override {
77 // intersect with out of bounds rect -> empty clip. 77 // intersect with out of bounds rect -> empty clip.
78 playbackCanvas.clipRect(SkRect::MakeXYWH(SkIntToScalar(10), SkIntToScala r(10), 78 playbackCanvas.clipRect(SkRect::MakeXYWH(SkIntToScalar(10), SkIntToScala r(10),
79 SkIntToScalar(1), SkIntToScalar(1)), SkRegion::kIntersect_Op); 79 SkIntToScalar(1), SkIntToScalar(1)), SkRegion::kIntersect_Op);
80 SkPaint paint; 80 SkPaint paint;
81 recordingCanvas.drawRect(SkRect::MakeXYWH(SkIntToScalar(0), SkIntToScala r(0), 81 recordingCanvas.drawRect(SkRect::MakeXYWH(SkIntToScalar(0), SkIntToScala r(0),
82 SkIntToScalar(3), SkIntToScalar(3)), paint); 82 SkIntToScalar(3), SkIntToScalar(3)), paint);
83 } 83 }
84 84
85 virtual ~EmptyClipPictureBBHTest() { } 85 virtual ~EmptyClipPictureBBHTest() { }
86 }; 86 };
87 87
88 DEF_TEST(PictureBBH, reporter) { 88 DEF_TEST(PictureBBH, reporter) {
89 89
90 DrawEmptyPictureBBHTest emptyPictureTest; 90 DrawEmptyPictureBBHTest emptyPictureTest;
91 emptyPictureTest.run(reporter); 91 emptyPictureTest.run(reporter);
92 92
93 EmptyClipPictureBBHTest emptyClipPictureTest; 93 EmptyClipPictureBBHTest emptyClipPictureTest;
94 emptyClipPictureTest.run(reporter); 94 emptyClipPictureTest.run(reporter);
95 } 95 }
OLDNEW
« no previous file with comments | « tests/PathOpsThreadedCommon.h ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698