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

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

Issue 2494833002: Revert of Replaced cc::SurfaceId::nonce_ with base::UnguessableToken (Closed)
Patch Set: Created 4 years, 1 month 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/Histogram.h" 10 #include "platform/Histogram.h"
(...skipping 10 matching lines...) Expand all
21 #include "ui/gfx/transform.h" 21 #include "ui/gfx/transform.h"
22 #include "wtf/typed_arrays/ArrayBuffer.h" 22 #include "wtf/typed_arrays/ArrayBuffer.h"
23 #include "wtf/typed_arrays/Uint8Array.h" 23 #include "wtf/typed_arrays/Uint8Array.h"
24 24
25 namespace blink { 25 namespace blink {
26 26
27 OffscreenCanvasFrameDispatcherImpl::OffscreenCanvasFrameDispatcherImpl( 27 OffscreenCanvasFrameDispatcherImpl::OffscreenCanvasFrameDispatcherImpl(
28 uint32_t clientId, 28 uint32_t clientId,
29 uint32_t sinkId, 29 uint32_t sinkId,
30 uint32_t localId, 30 uint32_t localId,
31 uint64_t nonceHigh, 31 uint64_t nonce,
32 uint64_t nonceLow,
33 int width, 32 int width,
34 int height) 33 int height)
35 : m_surfaceId( 34 : m_surfaceId(cc::FrameSinkId(clientId, sinkId),
36 cc::FrameSinkId(clientId, sinkId), 35 cc::LocalFrameId(localId, nonce)),
37 cc::LocalFrameId(
38 localId,
39 base::UnguessableToken::Deserialize(nonceHigh, nonceLow))),
40 m_width(width), 36 m_width(width),
41 m_height(height), 37 m_height(height),
42 m_nextResourceId(1u), 38 m_nextResourceId(1u),
43 m_binding(this) { 39 m_binding(this) {
44 DCHECK(!m_sink.is_bound()); 40 DCHECK(!m_sink.is_bound());
45 mojom::blink::OffscreenCanvasCompositorFrameSinkProviderPtr provider; 41 mojom::blink::OffscreenCanvasCompositorFrameSinkProviderPtr provider;
46 Platform::current()->interfaceProvider()->getInterface( 42 Platform::current()->interfaceProvider()->getInterface(
47 mojo::GetProxy(&provider)); 43 mojo::GetProxy(&provider));
48 provider->CreateCompositorFrameSink(m_surfaceId, 44 provider->CreateCompositorFrameSink(m_surfaceId,
49 m_binding.CreateInterfacePtrAndBind(), 45 m_binding.CreateInterfacePtrAndBind(),
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } 334 }
339 335
340 bool OffscreenCanvasFrameDispatcherImpl::verifyImageSize( 336 bool OffscreenCanvasFrameDispatcherImpl::verifyImageSize(
341 const IntSize imageSize) { 337 const IntSize imageSize) {
342 if (imageSize.width() == m_width && imageSize.height() == m_height) 338 if (imageSize.width() == m_width && imageSize.height() == m_height)
343 return true; 339 return true;
344 return false; 340 return false;
345 } 341 }
346 342
347 } // namespace blink 343 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h ('k') | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698