@@ -63,7 +63,7 @@ static bool CanRasterizeRect(const SkRect& cull_rect) {
63
63
static bool IsPictureWorthRasterizing (SkPicture* picture,
64
64
bool will_change,
65
65
bool is_complex,
66
- bool is_high_priority ) {
66
+ bool for_testing ) {
67
67
if (will_change) {
68
68
// If the picture is going to change in the future, there is no point in
69
69
// doing to extra work to rasterize.
@@ -76,7 +76,7 @@ static bool IsPictureWorthRasterizing(SkPicture* picture,
76
76
return false ;
77
77
}
78
78
79
- if (is_complex || is_high_priority ) {
79
+ if (is_complex || for_testing ) {
80
80
// The caller seems to have extra information about the picture and thinks
81
81
// the picture is always worth rasterizing.
82
82
return true ;
@@ -91,7 +91,7 @@ static bool IsDisplayListWorthRasterizing(
91
91
DisplayList* display_list,
92
92
bool will_change,
93
93
bool is_complex,
94
- bool is_high_priority ,
94
+ bool for_testing ,
95
95
DisplayListComplexityCalculator* complexity_calculator) {
96
96
if (will_change) {
97
97
// If the display list is going to change in the future, there is no point
@@ -105,7 +105,7 @@ static bool IsDisplayListWorthRasterizing(
105
105
return false ;
106
106
}
107
107
108
- if (is_complex || is_high_priority ) {
108
+ if (is_complex || for_testing ) {
109
109
// The caller seems to have extra information about the display list and
110
110
// thinks the display list is always worth rasterizing.
111
111
return true ;
@@ -222,17 +222,17 @@ std::unique_ptr<RasterCacheResult> RasterCache::RasterizeLayer(
222
222
223
223
bool RasterCache::Prepare (PrerollContext* context,
224
224
SkPicture* picture,
225
- bool is_complex ,
225
+ bool for_testing ,
226
226
bool will_change,
227
227
const SkMatrix& untranslated_matrix,
228
228
const SkPoint& offset,
229
- bool is_high_priority ) {
229
+ bool is_complex ) {
230
230
if (!GenerateNewCacheInThisFrame ()) {
231
231
return false ;
232
232
}
233
233
234
234
if (!IsPictureWorthRasterizing (picture, will_change, is_complex,
235
- is_high_priority )) {
235
+ for_testing )) {
236
236
// We only deal with pictures that are worthy of rasterization.
237
237
return false ;
238
238
}
@@ -250,8 +250,8 @@ bool RasterCache::Prepare(PrerollContext* context,
250
250
251
251
// Creates an entry, if not present prior.
252
252
Entry& entry = cache_[cache_key];
253
- entry.is_high_priority = is_high_priority ;
254
- if (!is_high_priority && entry.access_count < access_threshold_) {
253
+ entry.is_complex = is_complex ;
254
+ if (!is_complex && entry.access_count < access_threshold_) {
255
255
// Frame threshold has not yet been reached.
256
256
return false ;
257
257
}
@@ -273,11 +273,11 @@ bool RasterCache::Prepare(PrerollContext* context,
273
273
274
274
bool RasterCache::Prepare (PrerollContext* context,
275
275
DisplayList* display_list,
276
- bool is_complex ,
276
+ bool for_testing ,
277
277
bool will_change,
278
278
const SkMatrix& untranslated_matrix,
279
279
const SkPoint& offset,
280
- bool is_high_priority ) {
280
+ bool is_complex ) {
281
281
if (!GenerateNewCacheInThisFrame ()) {
282
282
return false ;
283
283
}
@@ -288,7 +288,7 @@ bool RasterCache::Prepare(PrerollContext* context,
288
288
: DisplayListComplexityCalculator::GetForSoftware ();
289
289
290
290
if (!IsDisplayListWorthRasterizing (display_list, will_change, is_complex,
291
- is_high_priority , complexity_calculator)) {
291
+ for_testing , complexity_calculator)) {
292
292
// We only deal with display lists that are worthy of rasterization.
293
293
return false ;
294
294
}
@@ -307,8 +307,8 @@ bool RasterCache::Prepare(PrerollContext* context,
307
307
308
308
// Creates an entry, if not present prior.
309
309
Entry& entry = cache_[cache_key];
310
- entry.is_high_priority = is_high_priority ;
311
- if (!is_high_priority && entry.access_count < access_threshold_) {
310
+ entry.is_complex = is_complex ;
311
+ if (!is_complex && entry.access_count < access_threshold_) {
312
312
// Frame threshold has not yet been reached.
313
313
return false ;
314
314
}
0 commit comments