| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |