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

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

Issue 2379653006: Replaced cc::SurfaceId::nonce_ with base::UnguessableToken (Closed)
Patch Set: Changed SurfaceManager::kRootSurfaceId to a private field to avoid static initialization 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 nonce, 31 uint64_t nonceHigh,
32 uint64_t nonceLow,
32 int width, 33 int width,
33 int height) 34 int height)
34 : m_surfaceId(cc::FrameSinkId(clientId, sinkId), 35 : m_surfaceId(
35 cc::LocalFrameId(localId, nonce)), 36 cc::FrameSinkId(clientId, sinkId),
37 cc::LocalFrameId(
38 localId,
39 base::UnguessableToken::Deserialize(nonceHigh, nonceLow))),
36 m_width(width), 40 m_width(width),
37 m_height(height), 41 m_height(height),
38 m_nextResourceId(1u), 42 m_nextResourceId(1u),
39 m_binding(this) { 43 m_binding(this) {
40 DCHECK(!m_sink.is_bound()); 44 DCHECK(!m_sink.is_bound());
41 mojom::blink::OffscreenCanvasCompositorFrameSinkProviderPtr provider; 45 mojom::blink::OffscreenCanvasCompositorFrameSinkProviderPtr provider;
42 Platform::current()->interfaceProvider()->getInterface( 46 Platform::current()->interfaceProvider()->getInterface(
43 mojo::GetProxy(&provider)); 47 mojo::GetProxy(&provider));
44 provider->CreateCompositorFrameSink(m_surfaceId, 48 provider->CreateCompositorFrameSink(m_surfaceId,
45 m_binding.CreateInterfacePtrAndBind(), 49 m_binding.CreateInterfacePtrAndBind(),
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 } 338 }
335 339
336 bool OffscreenCanvasFrameDispatcherImpl::verifyImageSize( 340 bool OffscreenCanvasFrameDispatcherImpl::verifyImageSize(
337 const IntSize imageSize) { 341 const IntSize imageSize) {
338 if (imageSize.width() == m_width && imageSize.height() == m_height) 342 if (imageSize.width() == m_width && imageSize.height() == m_height)
339 return true; 343 return true;
340 return false; 344 return false;
341 } 345 }
342 346
343 } // namespace blink 347 } // 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