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

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

Issue 2584643002: Revamp OffscreenCanvas commit flow (Closed)
Patch Set: Furnish Created 4 years 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 12 matching lines...) Expand all
23 #include "ui/gfx/geometry/rect.h" 23 #include "ui/gfx/geometry/rect.h"
24 #include "ui/gfx/transform.h" 24 #include "ui/gfx/transform.h"
25 #include "wtf/typed_arrays/ArrayBuffer.h" 25 #include "wtf/typed_arrays/ArrayBuffer.h"
26 #include "wtf/typed_arrays/Uint8Array.h" 26 #include "wtf/typed_arrays/Uint8Array.h"
27 27
28 namespace blink { 28 namespace blink {
29 29
30 OffscreenCanvasFrameDispatcherImpl::OffscreenCanvasFrameDispatcherImpl( 30 OffscreenCanvasFrameDispatcherImpl::OffscreenCanvasFrameDispatcherImpl(
31 uint32_t clientId, 31 uint32_t clientId,
32 uint32_t sinkId, 32 uint32_t sinkId,
33 uint32_t localId,
34 uint64_t nonceHigh,
35 uint64_t nonceLow,
36 int canvasId, 33 int canvasId,
37 int width, 34 int width,
38 int height) 35 int height)
39 : m_frameSinkId(cc::FrameSinkId(clientId, sinkId)), 36 : m_surfaceIdAllocator(new cc::SurfaceIdAllocator()),
Fady Samuel 2016/12/15 19:54:52 You don't need this on the heap, just make it inpl
xlai (Olivia) 2016/12/15 22:20:12 Done.
40 m_currentLocalFrameId(cc::LocalFrameId( 37 m_frameSinkId(cc::FrameSinkId(clientId, sinkId)),
41 localId, 38 m_currentLocalFrameId(m_surfaceIdAllocator->GenerateId()),
42 base::UnguessableToken::Deserialize(nonceHigh, nonceLow))),
43 m_width(width), 39 m_width(width),
44 m_height(height), 40 m_height(height),
45 m_nextResourceId(1u), 41 m_nextResourceId(1u),
46 m_binding(this), 42 m_binding(this),
47 m_placeholderCanvasId(canvasId) { 43 m_placeholderCanvasId(canvasId) {
48 DCHECK(!m_sink.is_bound()); 44 DCHECK(!m_sink.is_bound());
49 mojom::blink::OffscreenCanvasCompositorFrameSinkProviderPtr provider; 45 mojom::blink::OffscreenCanvasCompositorFrameSinkProviderPtr provider;
50 Platform::current()->interfaceProvider()->getInterface( 46 Platform::current()->interfaceProvider()->getInterface(
51 mojo::GetProxy(&provider)); 47 mojo::GetProxy(&provider));
52 cc::SurfaceId surfaceId(m_frameSinkId, m_currentLocalFrameId); 48 cc::SurfaceId surfaceId(m_frameSinkId, m_currentLocalFrameId);
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 return true; 405 return true;
410 return false; 406 return false;
411 } 407 }
412 408
413 void OffscreenCanvasFrameDispatcherImpl::reshape(int width, int height) { 409 void OffscreenCanvasFrameDispatcherImpl::reshape(int width, int height) {
414 m_width = width; 410 m_width = width;
415 m_height = height; 411 m_height = height;
416 } 412 }
417 413
418 } // namespace blink 414 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698