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

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

Issue 2307213002: Switch to dark red for under-invalidation pixels (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | 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 (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 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 SkColor newPixel = newBitmap.getColor(x, y); 1313 SkColor newPixel = newBitmap.getColor(x, y);
1314 if (pixelsDiffer(oldPixel, newPixel) && !tracking.paintInvalidationR egionSinceLastPaint.contains(IntPoint(x, y))) { 1314 if (pixelsDiffer(oldPixel, newPixel) && !tracking.paintInvalidationR egionSinceLastPaint.contains(IntPoint(x, y))) {
1315 if (mismatchingPixels < maxMismatchesToReport) { 1315 if (mismatchingPixels < maxMismatchesToReport) {
1316 UnderPaintInvalidation underPaintInvalidation = { x, y, oldP ixel, newPixel }; 1316 UnderPaintInvalidation underPaintInvalidation = { x, y, oldP ixel, newPixel };
1317 tracking.underPaintInvalidations.append(underPaintInvalidati on); 1317 tracking.underPaintInvalidations.append(underPaintInvalidati on);
1318 LOG(ERROR) << debugName() << " Uninvalidated old/new pixels mismatch at " << x << "," << y << " old:" << std::hex << oldPixel << " new:" << newPixel; 1318 LOG(ERROR) << debugName() << " Uninvalidated old/new pixels mismatch at " << x << "," << y << " old:" << std::hex << oldPixel << " new:" << newPixel;
1319 } else if (mismatchingPixels == maxMismatchesToReport) { 1319 } else if (mismatchingPixels == maxMismatchesToReport) {
1320 LOG(ERROR) << "and more..."; 1320 LOG(ERROR) << "and more...";
1321 } 1321 }
1322 ++mismatchingPixels; 1322 ++mismatchingPixels;
1323 *newBitmap.getAddr32(x, y) = SkColorSetARGB(0x80, 0xFF, 0, 0xFF) ; // Half translucent magenta. 1323 *newBitmap.getAddr32(x, y) = SkColorSetARGB(0xFF, 0xA0, 0, 0); / / Dark red.
1324 } else { 1324 } else {
1325 *newBitmap.getAddr32(x, y) = SK_ColorTRANSPARENT; 1325 *newBitmap.getAddr32(x, y) = SK_ColorTRANSPARENT;
1326 } 1326 }
1327 } 1327 }
1328 } 1328 }
1329 1329
1330 oldBitmap.unlockPixels(); 1330 oldBitmap.unlockPixels();
1331 newBitmap.unlockPixels(); 1331 newBitmap.unlockPixels();
1332 1332
1333 // Visualize under-invalidations by overlaying the new bitmap (containing re d pixels indicating under-invalidations, 1333 // Visualize under-invalidations by overlaying the new bitmap (containing re d pixels indicating under-invalidations,
(...skipping 12 matching lines...) Expand all
1346 { 1346 {
1347 if (!layer) { 1347 if (!layer) {
1348 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); 1348 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n");
1349 return; 1349 return;
1350 } 1350 }
1351 1351
1352 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); 1352 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo);
1353 fprintf(stderr, "%s\n", output.utf8().data()); 1353 fprintf(stderr, "%s\n", output.utf8().data());
1354 } 1354 }
1355 #endif 1355 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698