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

Side by Side Diff: tests/RecordDrawTest.cpp

Issue 243243003: anticipate more optimizations by renaming some files and methods (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « tests/RecordCullingTest.cpp ('k') | tools/bench_playback.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 "Test.h" 8 #include "Test.h"
9 9
10 #include "SkDebugCanvas.h" 10 #include "SkDebugCanvas.h"
11 #include "SkRecord.h" 11 #include "SkRecord.h"
12 #include "SkRecordCulling.h" 12 #include "SkRecordOpts.h"
13 #include "SkRecordDraw.h" 13 #include "SkRecordDraw.h"
14 #include "SkRecorder.h" 14 #include "SkRecorder.h"
15 #include "SkRecords.h" 15 #include "SkRecords.h"
16 16
17 static const int W = 1920, H = 1080; 17 static const int W = 1920, H = 1080;
18 18
19 DEF_TEST(RecordDraw_Culling, r) { 19 DEF_TEST(RecordDraw_Culling, r) {
20 // Record these 7 drawing commands verbatim. 20 // Record these 7 drawing commands verbatim.
21 SkRecord record; 21 SkRecord record;
22 SkRecorder recorder(SkRecorder::kWriteOnly_Mode, &record, W, H); 22 SkRecorder recorder(SkRecorder::kWriteOnly_Mode, &record, W, H);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 recorder.restore(); 63 recorder.restore();
64 64
65 // Same deal as above: we need full SkCanvas semantics for clip skipping to work. 65 // Same deal as above: we need full SkCanvas semantics for clip skipping to work.
66 SkRecord rerecord; 66 SkRecord rerecord;
67 SkRecorder rerecorder(SkRecorder::kReadWrite_Mode, &rerecord, W, H); 67 SkRecorder rerecorder(SkRecorder::kReadWrite_Mode, &rerecord, W, H);
68 SkRecordDraw(record, &rerecorder); 68 SkRecordDraw(record, &rerecorder);
69 69
70 // All commands except the two marked // Skipped above will be preserved. 70 // All commands except the two marked // Skipped above will be preserved.
71 REPORTER_ASSERT(r, 7 == rerecord.count()); 71 REPORTER_ASSERT(r, 7 == rerecord.count());
72 } 72 }
OLDNEW
« no previous file with comments | « tests/RecordCullingTest.cpp ('k') | tools/bench_playback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698