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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp

Issue 1552693002: Add paint testing mode subsequence_caching_disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@RemoveSyncPaint
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 if (firstPaintInvalidationTrackingEnabled()) 323 if (firstPaintInvalidationTrackingEnabled())
324 m_debugInfo.clearAnnotatedInvalidateRects(); 324 m_debugInfo.clearAnnotatedInvalidateRects();
325 incrementPaintCount(); 325 incrementPaintCount();
326 326
327 IntRect newInterestRect; 327 IntRect newInterestRect;
328 if (!interestRect) { 328 if (!interestRect) {
329 newInterestRect = m_client->computeInterestRect(this, m_previousInterest Rect); 329 newInterestRect = m_client->computeInterestRect(this, m_previousInterest Rect);
330 interestRect = &newInterestRect; 330 interestRect = &newInterestRect;
331 } 331 }
332 332
333 if (!m_client->needsRepaint() && !paintController().cacheIsEmpty() && m_prev iousInterestRect == *interestRect) { 333 if (!paintController().subsequenceCachingIsDisabled()
334 && !m_client->needsRepaint()
335 && !paintController().cacheIsEmpty()
336 && m_previousInterestRect == *interestRect) {
334 ASSERT(!paintController().hasInvalidations()); 337 ASSERT(!paintController().hasInvalidations());
335 return false; 338 return false;
336 } 339 }
337 340
338 GraphicsContext context(paintController(), disabledMode); 341 GraphicsContext context(paintController(), disabledMode);
339 342
340 #ifndef NDEBUG 343 #ifndef NDEBUG
341 if (contentsOpaque() && s_drawDebugRedFill) { 344 if (contentsOpaque() && s_drawDebugRedFill) {
342 FloatRect rect(FloatPoint(), size()); 345 FloatRect rect(FloatPoint(), size());
343 if (!DrawingRecorder::useCachedDrawingIfPossible(context, *this, Display Item::DebugRedFill)) { 346 if (!DrawingRecorder::useCachedDrawingIfPossible(context, *this, Display Item::DebugRedFill)) {
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 { 1258 {
1256 if (!layer) { 1259 if (!layer) {
1257 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); 1260 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n");
1258 return; 1261 return;
1259 } 1262 }
1260 1263
1261 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); 1264 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo);
1262 fprintf(stderr, "%s\n", output.utf8().data()); 1265 fprintf(stderr, "%s\n", output.utf8().data());
1263 } 1266 }
1264 #endif 1267 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698