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

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

Issue 2481363007: Update First Paint to include paint of non-default document background color (Closed)
Patch Set: Created 4 years, 1 month 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 notifyFirstPaintToClient(); 332 notifyFirstPaintToClient();
333 return true; 333 return true;
334 } 334 }
335 335
336 void GraphicsLayer::notifyFirstPaintToClient() { 336 void GraphicsLayer::notifyFirstPaintToClient() {
337 bool isFirstPaint = false; 337 bool isFirstPaint = false;
338 if (!m_painted) { 338 if (!m_painted) {
339 DisplayItemList& itemList = m_paintController->newDisplayItemList(); 339 DisplayItemList& itemList = m_paintController->newDisplayItemList();
340 for (DisplayItem& item : itemList) { 340 for (DisplayItem& item : itemList) {
341 DisplayItem::Type type = item.getType(); 341 DisplayItem::Type type = item.getType();
342 if (type == DisplayItem::kDocumentBackground &&
343 !m_paintController->nonDefaultBackgroundColorPainted()) {
344 continue;
345 }
342 if (DisplayItem::isDrawingType(type) && 346 if (DisplayItem::isDrawingType(type) &&
343 type != DisplayItem::kDocumentBackground &&
344 static_cast<const DrawingDisplayItem&>(item).picture()) { 347 static_cast<const DrawingDisplayItem&>(item).picture()) {
345 m_painted = true; 348 m_painted = true;
346 isFirstPaint = true; 349 isFirstPaint = true;
347 break; 350 break;
348 } 351 }
349 } 352 }
350 } 353 }
351 m_client->notifyPaint(isFirstPaint, m_paintController->textPainted(), 354 m_client->notifyPaint(isFirstPaint, m_paintController->textPainted(),
352 m_paintController->imagePainted()); 355 m_paintController->imagePainted());
353 } 356 }
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) { 1308 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) {
1306 if (!layer) { 1309 if (!layer) {
1307 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); 1310 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n");
1308 return; 1311 return;
1309 } 1312 }
1310 1313
1311 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); 1314 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo);
1312 fprintf(stderr, "%s\n", output.utf8().data()); 1315 fprintf(stderr, "%s\n", output.utf8().data());
1313 } 1316 }
1314 #endif 1317 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698