| OLD | NEW | 
|    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 #include "RecordTestUtils.h" |    9 #include "RecordTestUtils.h" | 
|   10  |   10  | 
| (...skipping 28 matching lines...) Expand all  Loading... | 
|   39     REPORTER_ASSERT(r, 0 == record.count());    // the save was not recorded (ye
     t) |   39     REPORTER_ASSERT(r, 0 == record.count());    // the save was not recorded (ye
     t) | 
|   40     recorder.drawColor(SK_ColorRED); |   40     recorder.drawColor(SK_ColorRED); | 
|   41     REPORTER_ASSERT(r, 1 == record.count()); |   41     REPORTER_ASSERT(r, 1 == record.count()); | 
|   42     recorder.scale(2, 2); |   42     recorder.scale(2, 2); | 
|   43     REPORTER_ASSERT(r, 3 == record.count());    // now we see the save |   43     REPORTER_ASSERT(r, 3 == record.count());    // now we see the save | 
|   44     recorder.restore(); |   44     recorder.restore(); | 
|   45     REPORTER_ASSERT(r, 4 == record.count()); |   45     REPORTER_ASSERT(r, 4 == record.count()); | 
|   46  |   46  | 
|   47     assert_type<SkRecords::DrawPaint>(r, record, 0); |   47     assert_type<SkRecords::DrawPaint>(r, record, 0); | 
|   48     assert_type<SkRecords::Save>     (r, record, 1); |   48     assert_type<SkRecords::Save>     (r, record, 1); | 
|   49     assert_type<SkRecords::SetMatrix>(r, record, 2); |   49     assert_type<SkRecords::Concat>   (r, record, 2); | 
|   50     assert_type<SkRecords::Restore>  (r, record, 3); |   50     assert_type<SkRecords::Restore>  (r, record, 3); | 
|   51  |   51  | 
|   52     recorder.save(); |   52     recorder.save(); | 
|   53     recorder.save(); |   53     recorder.save(); | 
|   54     recorder.restore(); |   54     recorder.restore(); | 
|   55     recorder.restore(); |   55     recorder.restore(); | 
|   56     REPORTER_ASSERT(r, 4 == record.count()); |   56     REPORTER_ASSERT(r, 4 == record.count()); | 
|   57 } |   57 } | 
|   58  |   58  | 
|   59 DEF_TEST(RecordDraw_Abort, r) { |   59 DEF_TEST(RecordDraw_Abort, r) { | 
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  296  |  296  | 
|  297     { |  297     { | 
|  298         SkRecord record; |  298         SkRecord record; | 
|  299         SkRecorder recorder(&record, 10, 10); |  299         SkRecorder recorder(&record, 10, 10); | 
|  300         recorder.drawImageRect(image, SkRect::MakeWH(10, 10), nullptr); |  300         recorder.drawImageRect(image, SkRect::MakeWH(10, 10), nullptr); | 
|  301         SkRecordDraw(record, &canvas, nullptr, nullptr, 0, nullptr, 0); |  301         SkRecordDraw(record, &canvas, nullptr, nullptr, 0, nullptr, 0); | 
|  302     } |  302     } | 
|  303     REPORTER_ASSERT(r, canvas.fDrawImageRectCalled); |  303     REPORTER_ASSERT(r, canvas.fDrawImageRectCalled); | 
|  304  |  304  | 
|  305 } |  305 } | 
| OLD | NEW |