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

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 comments in surface_id.h to reflect the change 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/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 11 matching lines...) Expand all
22 #include "ui/gfx/transform.h" 22 #include "ui/gfx/transform.h"
23 #include "wtf/typed_arrays/ArrayBuffer.h" 23 #include "wtf/typed_arrays/ArrayBuffer.h"
24 #include "wtf/typed_arrays/Uint8Array.h" 24 #include "wtf/typed_arrays/Uint8Array.h"
25 25
26 namespace blink { 26 namespace blink {
27 27
28 OffscreenCanvasFrameDispatcherImpl::OffscreenCanvasFrameDispatcherImpl( 28 OffscreenCanvasFrameDispatcherImpl::OffscreenCanvasFrameDispatcherImpl(
29 uint32_t clientId, 29 uint32_t clientId,
30 uint32_t sinkId, 30 uint32_t sinkId,
31 uint32_t localId, 31 uint32_t localId,
32 uint64_t nonce, 32 uint64_t nonceHigh,
33 uint64_t nonceLow,
33 int width, 34 int width,
34 int height) 35 int height)
35 : m_surfaceId(cc::FrameSinkId(clientId, sinkId), 36 : m_surfaceId(
36 cc::LocalFrameId(localId, nonce)), 37 cc::FrameSinkId(clientId, sinkId),
38 cc::LocalFrameId(
39 localId,
40 base::UnguessableToken::Deserialize(nonceHigh, nonceLow))),
37 m_width(width), 41 m_width(width),
38 m_height(height), 42 m_height(height),
39 m_nextResourceId(1u), 43 m_nextResourceId(1u),
40 m_binding(this) { 44 m_binding(this) {
41 DCHECK(!m_sink.is_bound()); 45 DCHECK(!m_sink.is_bound());
42 mojom::blink::OffscreenCanvasCompositorFrameSinkProviderPtr provider; 46 mojom::blink::OffscreenCanvasCompositorFrameSinkProviderPtr provider;
43 Platform::current()->interfaceProvider()->getInterface( 47 Platform::current()->interfaceProvider()->getInterface(
44 mojo::GetProxy(&provider)); 48 mojo::GetProxy(&provider));
45 provider->CreateCompositorFrameSink(m_surfaceId, 49 provider->CreateCompositorFrameSink(m_surfaceId,
46 m_binding.CreateInterfacePtrAndBind(), 50 m_binding.CreateInterfacePtrAndBind(),
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 } 329 }
326 330
327 bool OffscreenCanvasFrameDispatcherImpl::verifyImageSize( 331 bool OffscreenCanvasFrameDispatcherImpl::verifyImageSize(
328 const sk_sp<SkImage>& image) { 332 const sk_sp<SkImage>& image) {
329 if (image && image->width() == m_width && image->height() == m_height) 333 if (image && image->width() == m_width && image->height() == m_height)
330 return true; 334 return true;
331 return false; 335 return false;
332 } 336 }
333 337
334 } // namespace blink 338 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698