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

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

Issue 2333133003: Make Surface creation lazy for OffscreenCanvasFrameReceiverImpl (Closed)
Patch Set: Rebase Created 4 years, 3 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/CanvasSurfaceLayerBridgeClientImpl.h" 5 #include "platform/graphics/CanvasSurfaceLayerBridgeClientImpl.h"
6 6
7 #include "public/platform/InterfaceProvider.h" 7 #include "public/platform/InterfaceProvider.h"
8 #include "public/platform/Platform.h" 8 #include "public/platform/Platform.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 CanvasSurfaceLayerBridgeClientImpl::CanvasSurfaceLayerBridgeClientImpl() 12 CanvasSurfaceLayerBridgeClientImpl::CanvasSurfaceLayerBridgeClientImpl()
13 { 13 {
14 DCHECK(!m_service.is_bound()); 14 DCHECK(!m_service.is_bound());
15 Platform::current()->interfaceProvider()->getInterface(mojo::GetProxy(&m_ser vice)); 15 Platform::current()->interfaceProvider()->getInterface(mojo::GetProxy(&m_ser vice));
16 } 16 }
17 17
18 CanvasSurfaceLayerBridgeClientImpl::~CanvasSurfaceLayerBridgeClientImpl() 18 CanvasSurfaceLayerBridgeClientImpl::~CanvasSurfaceLayerBridgeClientImpl()
19 { 19 {
20 } 20 }
21 21
22 bool CanvasSurfaceLayerBridgeClientImpl::syncGetSurfaceId(cc::SurfaceId* surface IdPtr) 22 bool CanvasSurfaceLayerBridgeClientImpl::syncGetSurfaceId(cc::SurfaceId* surface IdPtr)
23 { 23 {
24 return m_service->GetSurfaceId(surfaceIdPtr); 24 return m_service->GetSurfaceId(surfaceIdPtr);
25 } 25 }
26 26
27 void CanvasSurfaceLayerBridgeClientImpl::asyncRequestSurfaceCreation(const cc::S urfaceId& surfaceId)
28 {
29 m_service->RequestSurfaceCreation(surfaceId);
30 }
31
32 void CanvasSurfaceLayerBridgeClientImpl::asyncRequire(const cc::SurfaceId& surfa ceId, const cc::SurfaceSequence& sequence) 27 void CanvasSurfaceLayerBridgeClientImpl::asyncRequire(const cc::SurfaceId& surfa ceId, const cc::SurfaceSequence& sequence)
33 { 28 {
34 m_service->Require(surfaceId, sequence); 29 m_service->Require(surfaceId, sequence);
35 } 30 }
36 31
37 void CanvasSurfaceLayerBridgeClientImpl::asyncSatisfy(const cc::SurfaceSequence& sequence) 32 void CanvasSurfaceLayerBridgeClientImpl::asyncSatisfy(const cc::SurfaceSequence& sequence)
38 { 33 {
39 m_service->Satisfy(sequence); 34 m_service->Satisfy(sequence);
40 } 35 }
41 36
42 } // namespace blink; 37 } // namespace blink;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698