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

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

Issue 2696183002: Migrate WTF::HashSet::remove() to ::erase() [part 1] (Closed)
Patch Set: one more platform-specific reference Created 3 years, 10 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 s_registeredLayerSet = new HashSet<int>; 410 s_registeredLayerSet = new HashSet<int>;
411 if (s_registeredLayerSet->contains(layer->id())) 411 if (s_registeredLayerSet->contains(layer->id()))
412 CRASH(); 412 CRASH();
413 s_registeredLayerSet->insert(layer->id()); 413 s_registeredLayerSet->insert(layer->id());
414 } 414 }
415 415
416 void GraphicsLayer::unregisterContentsLayer(WebLayer* layer) { 416 void GraphicsLayer::unregisterContentsLayer(WebLayer* layer) {
417 DCHECK(s_registeredLayerSet); 417 DCHECK(s_registeredLayerSet);
418 if (!s_registeredLayerSet->contains(layer->id())) 418 if (!s_registeredLayerSet->contains(layer->id()))
419 CRASH(); 419 CRASH();
420 s_registeredLayerSet->remove(layer->id()); 420 s_registeredLayerSet->erase(layer->id());
421 } 421 }
422 422
423 void GraphicsLayer::setContentsTo(WebLayer* layer) { 423 void GraphicsLayer::setContentsTo(WebLayer* layer) {
424 bool childrenChanged = false; 424 bool childrenChanged = false;
425 if (layer) { 425 if (layer) {
426 DCHECK(s_registeredLayerSet); 426 DCHECK(s_registeredLayerSet);
427 if (!s_registeredLayerSet->contains(layer->id())) 427 if (!s_registeredLayerSet->contains(layer->id()))
428 CRASH(); 428 CRASH();
429 if (m_contentsLayerId != layer->id()) { 429 if (m_contentsLayerId != layer->id()) {
430 setupContentsLayer(layer); 430 setupContentsLayer(layer);
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
1320 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) { 1320 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) {
1321 if (!layer) { 1321 if (!layer) {
1322 LOG(INFO) << "Cannot showGraphicsLayerTree for (nil)."; 1322 LOG(INFO) << "Cannot showGraphicsLayerTree for (nil).";
1323 return; 1323 return;
1324 } 1324 }
1325 1325
1326 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); 1326 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo);
1327 LOG(INFO) << output.utf8().data(); 1327 LOG(INFO) << output.utf8().data();
1328 } 1328 }
1329 #endif 1329 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698