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

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

Issue 2673543003: Migrate WTF::HashMap::remove() to ::erase() (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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/graphics/OffscreenCanvasFrameDispatcherImpl.h" 5 #include "platform/graphics/OffscreenCanvasFrameDispatcherImpl.h"
6 6
7 #include "cc/output/compositor_frame.h" 7 #include "cc/output/compositor_frame.h"
8 #include "cc/quads/texture_draw_quad.h" 8 #include "cc/quads/texture_draw_quad.h"
9 #include "gpu/command_buffer/client/gles2_interface.h" 9 #include "gpu/command_buffer/client/gles2_interface.h"
10 #include "platform/CrossThreadFunctional.h" 10 #include "platform/CrossThreadFunctional.h"
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 // An image resource needs to be returned by both the 418 // An image resource needs to be returned by both the
419 // CompositorFrameSink and the HTMLCanvasElement. These 419 // CompositorFrameSink and the HTMLCanvasElement. These
420 // events can happen in any order. The first of the two 420 // events can happen in any order. The first of the two
421 // to return a given resource will result in the spare 421 // to return a given resource will result in the spare
422 // resource lock being lifted, and the second will delete 422 // resource lock being lifted, and the second will delete
423 // the resource for real. 423 // the resource for real.
424 if (m_spareResourceLocks.contains(resourceId)) { 424 if (m_spareResourceLocks.contains(resourceId)) {
425 m_spareResourceLocks.remove(resourceId); 425 m_spareResourceLocks.remove(resourceId);
426 return; 426 return;
427 } 427 }
428 m_cachedImages.remove(resourceId); 428 m_cachedImages.erase(resourceId);
429 m_sharedBitmaps.remove(resourceId); 429 m_sharedBitmaps.erase(resourceId);
430 m_cachedTextureIds.remove(resourceId); 430 m_cachedTextureIds.erase(resourceId);
431 } 431 }
432 432
433 bool OffscreenCanvasFrameDispatcherImpl::verifyImageSize( 433 bool OffscreenCanvasFrameDispatcherImpl::verifyImageSize(
434 const IntSize imageSize) { 434 const IntSize imageSize) {
435 if (imageSize.width() == m_width && imageSize.height() == m_height) 435 if (imageSize.width() == m_width && imageSize.height() == m_height)
436 return true; 436 return true;
437 return false; 437 return false;
438 } 438 }
439 439
440 void OffscreenCanvasFrameDispatcherImpl::reshape(int width, int height) { 440 void OffscreenCanvasFrameDispatcherImpl::reshape(int width, int height) {
441 if (m_width != width || m_height != height) { 441 if (m_width != width || m_height != height) {
442 m_width = width; 442 m_width = width;
443 m_height = height; 443 m_height = height;
444 m_changeSizeForNextCommit = true; 444 m_changeSizeForNextCommit = true;
445 } 445 }
446 } 446 }
447 447
448 } // namespace blink 448 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698