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

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

Issue 2657443005: Migrate WTF::HashSet::add() to ::insert() [part 1 of N] (Closed)
Patch Set: 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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 } 402 }
403 } 403 }
404 404
405 static HashSet<int>* s_registeredLayerSet; 405 static HashSet<int>* s_registeredLayerSet;
406 406
407 void GraphicsLayer::registerContentsLayer(WebLayer* layer) { 407 void GraphicsLayer::registerContentsLayer(WebLayer* layer) {
408 if (!s_registeredLayerSet) 408 if (!s_registeredLayerSet)
409 s_registeredLayerSet = new HashSet<int>; 409 s_registeredLayerSet = new HashSet<int>;
410 if (s_registeredLayerSet->contains(layer->id())) 410 if (s_registeredLayerSet->contains(layer->id()))
411 CRASH(); 411 CRASH();
412 s_registeredLayerSet->add(layer->id()); 412 s_registeredLayerSet->insert(layer->id());
413 } 413 }
414 414
415 void GraphicsLayer::unregisterContentsLayer(WebLayer* layer) { 415 void GraphicsLayer::unregisterContentsLayer(WebLayer* layer) {
416 DCHECK(s_registeredLayerSet); 416 DCHECK(s_registeredLayerSet);
417 if (!s_registeredLayerSet->contains(layer->id())) 417 if (!s_registeredLayerSet->contains(layer->id()))
418 CRASH(); 418 CRASH();
419 s_registeredLayerSet->remove(layer->id()); 419 s_registeredLayerSet->remove(layer->id());
420 } 420 }
421 421
422 void GraphicsLayer::setContentsTo(WebLayer* layer) { 422 void GraphicsLayer::setContentsTo(WebLayer* layer) {
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
1326 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) { 1326 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) {
1327 if (!layer) { 1327 if (!layer) {
1328 LOG(INFO) << "Cannot showGraphicsLayerTree for (nil)."; 1328 LOG(INFO) << "Cannot showGraphicsLayerTree for (nil).";
1329 return; 1329 return;
1330 } 1330 }
1331 1331
1332 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); 1332 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo);
1333 LOG(INFO) << output.utf8().data(); 1333 LOG(INFO) << output.utf8().data();
1334 } 1334 }
1335 #endif 1335 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698