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

Side by Side Diff: tests/RecordReplaceDrawTest.cpp

Issue 806653007: Fix up all the easy virtual ... SK_OVERRIDE cases. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 11 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/RecordDrawTest.cpp ('k') | tests/SkpSkGrTest.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 #if SK_SUPPORT_GPU 8 #if SK_SUPPORT_GPU
9 9
10 #include "Test.h" 10 #include "Test.h"
11 11
12 #include "GrContextFactory.h" 12 #include "GrContextFactory.h"
13 #include "GrLayerCache.h" 13 #include "GrLayerCache.h"
14 #include "GrRecordReplaceDraw.h" 14 #include "GrRecordReplaceDraw.h"
15 #include "RecordTestUtils.h" 15 #include "RecordTestUtils.h"
16 #include "SkBBHFactory.h" 16 #include "SkBBHFactory.h"
17 #include "SkPictureRecorder.h" 17 #include "SkPictureRecorder.h"
18 #include "SkRecordDraw.h" 18 #include "SkRecordDraw.h"
19 #include "SkRecorder.h" 19 #include "SkRecorder.h"
20 #include "SkUtils.h" 20 #include "SkUtils.h"
21 21
22 static const int kWidth = 100; 22 static const int kWidth = 100;
23 static const int kHeight = 100; 23 static const int kHeight = 100;
24 24
25 class JustOneDraw : public SkPicture::AbortCallback { 25 class JustOneDraw : public SkPicture::AbortCallback {
26 public: 26 public:
27 JustOneDraw() : fCalls(0) {} 27 JustOneDraw() : fCalls(0) {}
28 28
29 virtual bool abort() SK_OVERRIDE { return fCalls++ > 0; } 29 bool abort() SK_OVERRIDE { return fCalls++ > 0; }
30 private: 30 private:
31 int fCalls; 31 int fCalls;
32 }; 32 };
33 33
34 // Make sure the abort callback works 34 // Make sure the abort callback works
35 DEF_TEST(RecordReplaceDraw_Abort, r) { 35 DEF_TEST(RecordReplaceDraw_Abort, r) {
36 SkAutoTUnref<const SkPicture> pic; 36 SkAutoTUnref<const SkPicture> pic;
37 37
38 { 38 {
39 // Record two commands. 39 // Record two commands.
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 if (NULL == context) { 158 if (NULL == context) {
159 continue; 159 continue;
160 } 160 }
161 161
162 test_replacements(r, context, true); 162 test_replacements(r, context, true);
163 test_replacements(r, context, false); 163 test_replacements(r, context, false);
164 } 164 }
165 } 165 }
166 166
167 #endif 167 #endif
OLDNEW
« no previous file with comments | « tests/RecordDrawTest.cpp ('k') | tests/SkpSkGrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698