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

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

Issue 2382873002: Replace usage of SurfaceId's client_id with FrameSinkId (Closed)
Patch Set: Rebased 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 12 matching lines...) Expand all
23 #include "ui/gfx/transform.h" 23 #include "ui/gfx/transform.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 localId, 29 uint32_t localId,
30 uint64_t nonce, 30 uint64_t nonce,
31 int width, 31 int width,
32 int height) 32 int height)
33 : m_surfaceId(cc::SurfaceId(clientId, localId, nonce)), 33 : m_surfaceId(cc::SurfaceId(cc::FrameSinkId(clientId, 0 /* sink_id */),
34 localId,
35 nonce)),
34 m_width(width), 36 m_width(width),
35 m_height(height), 37 m_height(height),
36 m_nextResourceId(1u), 38 m_nextResourceId(1u),
37 m_binding(this) { 39 m_binding(this) {
38 DCHECK(!m_sink.is_bound()); 40 DCHECK(!m_sink.is_bound());
39 mojom::blink::OffscreenCanvasCompositorFrameSinkProviderPtr provider; 41 mojom::blink::OffscreenCanvasCompositorFrameSinkProviderPtr provider;
40 Platform::current()->interfaceProvider()->getInterface( 42 Platform::current()->interfaceProvider()->getInterface(
41 mojo::GetProxy(&provider)); 43 mojo::GetProxy(&provider));
42 provider->CreateCompositorFrameSink(m_surfaceId, 44 provider->CreateCompositorFrameSink(m_surfaceId,
43 m_binding.CreateInterfacePtrAndBind(), 45 m_binding.CreateInterfacePtrAndBind(),
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 149 }
148 150
149 bool OffscreenCanvasFrameDispatcherImpl::verifyImageSize( 151 bool OffscreenCanvasFrameDispatcherImpl::verifyImageSize(
150 const sk_sp<SkImage>& image) { 152 const sk_sp<SkImage>& image) {
151 if (image && image->width() == m_width && image->height() == m_height) 153 if (image && image->width() == m_width && image->height() == m_height)
152 return true; 154 return true;
153 return false; 155 return false;
154 } 156 }
155 157
156 } // namespace blink 158 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp ('k') | ui/android/context_provider_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698