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 | 9 |
10 #if SK_SUPPORT_GPU | 10 #if SK_SUPPORT_GPU |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 } | 130 } |
131 | 131 |
132 SkRecord rerecord; | 132 SkRecord rerecord; |
133 SkRecorder canvas(&rerecord, kWidth, kHeight); | 133 SkRecorder canvas(&rerecord, kWidth, kHeight); |
134 GrRecordReplaceDraw(pic.get(), &canvas, layerCache, SkMatrix::I(), nullptr/*
callback*/); | 134 GrRecordReplaceDraw(pic.get(), &canvas, layerCache, SkMatrix::I(), nullptr/*
callback*/); |
135 | 135 |
136 int numLayers = count_instances_of_type<SkRecords::SaveLayer>(rerecord); | 136 int numLayers = count_instances_of_type<SkRecords::SaveLayer>(rerecord); |
137 if (doReplace) { | 137 if (doReplace) { |
138 REPORTER_ASSERT(r, 0 == numLayers); | 138 REPORTER_ASSERT(r, 0 == numLayers); |
139 } else { | 139 } else { |
140 REPORTER_ASSERT(r, 1 == numLayers); | 140 REPORTER_ASSERT(r, 1 == numLayers); |
141 } | 141 } |
142 } | 142 } |
143 | 143 |
144 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(RecordReplaceDraw, r, context) { | 144 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(RecordReplaceDraw, r, context) { |
145 test_replacements(r, context, false); | 145 test_replacements(r, context, false); |
146 test_replacements(r, context, true); | 146 test_replacements(r, context, true); |
147 } | 147 } |
148 | 148 |
149 #endif | 149 #endif |
OLD | NEW |