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

Side by Side Diff: content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.cc

Issue 2612083002: DirectCompositorFrameSink Uses CompositorFrameSinkSupport (Closed)
Patch Set: Address comments and revert changes in Android Created 3 years, 10 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 "content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.h " 5 #include "content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.h "
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "cc/surfaces/surface.h" 8 #include "cc/surfaces/surface.h"
9 #include "cc/surfaces/surface_manager.h" 9 #include "cc/surfaces/surface_manager.h"
10 #include "content/browser/renderer_host/offscreen_canvas_compositor_frame_sink_p rovider_impl.h" 10 #include "content/browser/renderer_host/offscreen_canvas_compositor_frame_sink_p rovider_impl.h"
11 #include "mojo/public/cpp/bindings/strong_binding.h" 11 #include "mojo/public/cpp/bindings/strong_binding.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 OffscreenCanvasCompositorFrameSink::OffscreenCanvasCompositorFrameSink( 15 OffscreenCanvasCompositorFrameSink::OffscreenCanvasCompositorFrameSink(
16 OffscreenCanvasCompositorFrameSinkProviderImpl* provider, 16 OffscreenCanvasCompositorFrameSinkProviderImpl* provider,
17 const cc::FrameSinkId& frame_sink_id, 17 const cc::FrameSinkId& frame_sink_id,
18 cc::mojom::MojoCompositorFrameSinkRequest request, 18 cc::mojom::MojoCompositorFrameSinkRequest request,
19 cc::mojom::MojoCompositorFrameSinkClientPtr client) 19 cc::mojom::MojoCompositorFrameSinkClientPtr client)
20 : provider_(provider), 20 : provider_(provider),
21 support_(this, 21 support_(this,
22 provider->GetSurfaceManager(), 22 provider->GetSurfaceManager(),
23 frame_sink_id, 23 frame_sink_id,
24 nullptr, 24 nullptr,
25 nullptr), 25 true,
Fady Samuel 2017/02/07 17:42:18 Please specify what these trues mean: e.g. true /*
Alex Z. 2017/02/07 17:47:50 Done.
danakj 2017/02/07 17:47:55 and here
Alex Z. 2017/02/07 17:51:33 Done.
26 true),
26 client_(std::move(client)), 27 client_(std::move(client)),
27 binding_(this, std::move(request)) { 28 binding_(this, std::move(request)) {
28 binding_.set_connection_error_handler( 29 binding_.set_connection_error_handler(
29 base::Bind(&OffscreenCanvasCompositorFrameSink::OnClientConnectionLost, 30 base::Bind(&OffscreenCanvasCompositorFrameSink::OnClientConnectionLost,
30 base::Unretained(this))); 31 base::Unretained(this)));
31 } 32 }
32 33
33 OffscreenCanvasCompositorFrameSink::~OffscreenCanvasCompositorFrameSink() { 34 OffscreenCanvasCompositorFrameSink::~OffscreenCanvasCompositorFrameSink() {
34 provider_->OnCompositorFrameSinkClientDestroyed(support_.frame_sink_id()); 35 provider_->OnCompositorFrameSinkClientDestroyed(support_.frame_sink_id());
35 } 36 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 if (client_) 84 if (client_)
84 client_->WillDrawSurface(); 85 client_->WillDrawSurface();
85 } 86 }
86 87
87 void OffscreenCanvasCompositorFrameSink::OnClientConnectionLost() { 88 void OffscreenCanvasCompositorFrameSink::OnClientConnectionLost() {
88 provider_->OnCompositorFrameSinkClientConnectionLost( 89 provider_->OnCompositorFrameSinkClientConnectionLost(
89 support_.frame_sink_id()); 90 support_.frame_sink_id());
90 } 91 }
91 92
92 } // namespace content 93 } // namespace content
OLDNEW
« components/exo/compositor_frame_sink.cc ('K') | « components/exo/compositor_frame_sink.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698