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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.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 // 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 // it is returned. 251 // it is returned.
252 image->transfer(); 252 image->transfer();
253 RefPtr<WebTaskRunner> dispatcherTaskRunner = 253 RefPtr<WebTaskRunner> dispatcherTaskRunner =
254 Platform::current()->currentThread()->getWebTaskRunner(); 254 Platform::current()->currentThread()->getWebTaskRunner();
255 255
256 Platform::current()->mainThread()->getWebTaskRunner()->postTask( 256 Platform::current()->mainThread()->getWebTaskRunner()->postTask(
257 BLINK_FROM_HERE, 257 BLINK_FROM_HERE,
258 crossThreadBind(updatePlaceholderImage, this->createWeakPtr(), 258 crossThreadBind(updatePlaceholderImage, this->createWeakPtr(),
259 WTF::passed(std::move(dispatcherTaskRunner)), 259 WTF::passed(std::move(dispatcherTaskRunner)),
260 m_placeholderCanvasId, std::move(image), resource.id)); 260 m_placeholderCanvasId, std::move(image), resource.id));
261 m_spareResourceLocks.add(m_nextResourceId); 261 m_spareResourceLocks.insert(m_nextResourceId);
262 262
263 commitTypeHistogram.count(commitType); 263 commitTypeHistogram.count(commitType);
264 264
265 m_nextResourceId++; 265 m_nextResourceId++;
266 frame.resource_list.push_back(std::move(resource)); 266 frame.resource_list.push_back(std::move(resource));
267 267
268 cc::TextureDrawQuad* quad = 268 cc::TextureDrawQuad* quad =
269 pass->CreateAndAppendDrawQuad<cc::TextureDrawQuad>(); 269 pass->CreateAndAppendDrawQuad<cc::TextureDrawQuad>();
270 gfx::Size rectSize(m_width, m_height); 270 gfx::Size rectSize(m_width, m_height);
271 271
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 450
451 void OffscreenCanvasFrameDispatcherImpl::reshape(int width, int height) { 451 void OffscreenCanvasFrameDispatcherImpl::reshape(int width, int height) {
452 if (m_width != width || m_height != height) { 452 if (m_width != width || m_height != height) {
453 m_width = width; 453 m_width = width;
454 m_height = height; 454 m_height = height;
455 m_changeSizeForNextCommit = true; 455 m_changeSizeForNextCommit = true;
456 } 456 }
457 } 457 }
458 458
459 } // namespace blink 459 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698