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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 "SoftwareCanvasSoftwareCompositingWorker", | 351 "SoftwareCanvasSoftwareCompositingWorker", |
352 0, 10000000, 50)); | 352 0, 10000000, 50)); |
353 commitSoftwareCanvasSoftwareCompositingWorkerTimer.count(elapsedTime * | 353 commitSoftwareCanvasSoftwareCompositingWorkerTimer.count(elapsedTime * |
354 1000000.0); | 354 1000000.0); |
355 } | 355 } |
356 break; | 356 break; |
357 case OffscreenCanvasCommitTypeCount: | 357 case OffscreenCanvasCommitTypeCount: |
358 NOTREACHED(); | 358 NOTREACHED(); |
359 } | 359 } |
360 | 360 |
361 m_sink->SubmitCompositorFrame(std::move(frame)); | 361 m_sink->SubmitCompositorFrame(m_surfaceId.local_frame_id(), std::move(frame)); |
362 } | 362 } |
363 | 363 |
364 void OffscreenCanvasFrameDispatcherImpl::DidReceiveCompositorFrameAck() { | 364 void OffscreenCanvasFrameDispatcherImpl::DidReceiveCompositorFrameAck() { |
365 // TODO(fsamuel): Implement this. | 365 // TODO(fsamuel): Implement this. |
366 } | 366 } |
367 | 367 |
368 void OffscreenCanvasFrameDispatcherImpl::OnBeginFrame( | 368 void OffscreenCanvasFrameDispatcherImpl::OnBeginFrame( |
369 const cc::BeginFrameArgs& beginFrameArgs) {} | 369 const cc::BeginFrameArgs& beginFrameArgs) {} |
370 | 370 |
371 void OffscreenCanvasFrameDispatcherImpl::ReclaimResources( | 371 void OffscreenCanvasFrameDispatcherImpl::ReclaimResources( |
(...skipping 23 matching lines...) Expand all Loading... |
395 } | 395 } |
396 | 396 |
397 bool OffscreenCanvasFrameDispatcherImpl::verifyImageSize( | 397 bool OffscreenCanvasFrameDispatcherImpl::verifyImageSize( |
398 const IntSize imageSize) { | 398 const IntSize imageSize) { |
399 if (imageSize.width() == m_width && imageSize.height() == m_height) | 399 if (imageSize.width() == m_width && imageSize.height() == m_height) |
400 return true; | 400 return true; |
401 return false; | 401 return false; |
402 } | 402 } |
403 | 403 |
404 } // namespace blink | 404 } // namespace blink |
OLD | NEW |