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

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

Issue 2379653006: Replaced cc::SurfaceId::nonce_ with base::UnguessableToken (Closed)
Patch Set: Moved include statement from surface_id_struct_traits.h to local_frame_id_struct_traits.h Created 4 years, 2 months 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/output/delegated_frame_data.h" 8 #include "cc/output/delegated_frame_data.h"
9 #include "cc/quads/render_pass.h" 9 #include "cc/quads/render_pass.h"
10 #include "cc/quads/shared_quad_state.h" 10 #include "cc/quads/shared_quad_state.h"
(...skipping 17 matching lines...) Expand all
28 #include "ui/gfx/transform.h" 28 #include "ui/gfx/transform.h"
29 #include "wtf/typed_arrays/ArrayBuffer.h" 29 #include "wtf/typed_arrays/ArrayBuffer.h"
30 #include "wtf/typed_arrays/Uint8Array.h" 30 #include "wtf/typed_arrays/Uint8Array.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 OffscreenCanvasFrameDispatcherImpl::OffscreenCanvasFrameDispatcherImpl( 34 OffscreenCanvasFrameDispatcherImpl::OffscreenCanvasFrameDispatcherImpl(
35 uint32_t clientId, 35 uint32_t clientId,
36 uint32_t sinkId, 36 uint32_t sinkId,
37 uint32_t localId, 37 uint32_t localId,
38 uint64_t nonce, 38 uint64_t nonceHigh,
39 uint64_t nonceLow,
39 int width, 40 int width,
40 int height) 41 int height)
41 : m_surfaceId(cc::FrameSinkId(clientId, sinkId), 42 : m_surfaceId(
42 cc::LocalFrameId(localId, nonce)), 43 cc::FrameSinkId(clientId, sinkId),
44 cc::LocalFrameId(
45 localId,
46 base::UnguessableToken::Deserialize(nonceHigh, nonceLow))),
43 m_width(width), 47 m_width(width),
44 m_height(height), 48 m_height(height),
45 m_nextResourceId(1u), 49 m_nextResourceId(1u),
46 m_binding(this) { 50 m_binding(this) {
47 DCHECK(!m_sink.is_bound()); 51 DCHECK(!m_sink.is_bound());
48 mojom::blink::OffscreenCanvasCompositorFrameSinkProviderPtr provider; 52 mojom::blink::OffscreenCanvasCompositorFrameSinkProviderPtr provider;
49 Platform::current()->interfaceProvider()->getInterface( 53 Platform::current()->interfaceProvider()->getInterface(
50 mojo::GetProxy(&provider)); 54 mojo::GetProxy(&provider));
51 provider->CreateCompositorFrameSink(m_surfaceId, 55 provider->CreateCompositorFrameSink(m_surfaceId,
52 m_binding.CreateInterfacePtrAndBind(), 56 m_binding.CreateInterfacePtrAndBind(),
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 } 243 }
240 244
241 bool OffscreenCanvasFrameDispatcherImpl::verifyImageSize( 245 bool OffscreenCanvasFrameDispatcherImpl::verifyImageSize(
242 const sk_sp<SkImage>& image) { 246 const sk_sp<SkImage>& image) {
243 if (image && image->width() == m_width && image->height() == m_height) 247 if (image && image->width() == m_width && image->height() == m_height)
244 return true; 248 return true;
245 return false; 249 return false;
246 } 250 }
247 251
248 } // namespace blink 252 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698