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

Side by Side Diff: content/browser/renderer_host/browser_compositor_view_mac.mm

Issue 2383373002: Reduce SurfaceIdAllocator usage and tie SurfaceFactory to a single 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/browser_compositor_view_mac.h" 5 #include "content/browser/renderer_host/browser_compositor_view_mac.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 ui::AcceleratedWidgetMacNSView* accelerated_widget_mac_ns_view, 167 ui::AcceleratedWidgetMacNSView* accelerated_widget_mac_ns_view,
168 BrowserCompositorMacClient* client, 168 BrowserCompositorMacClient* client,
169 bool render_widget_host_is_hidden, 169 bool render_widget_host_is_hidden,
170 bool ns_view_attached_to_window) 170 bool ns_view_attached_to_window)
171 : client_(client), 171 : client_(client),
172 accelerated_widget_mac_ns_view_(accelerated_widget_mac_ns_view), 172 accelerated_widget_mac_ns_view_(accelerated_widget_mac_ns_view),
173 weak_factory_(this) { 173 weak_factory_(this) {
174 g_browser_compositor_count += 1; 174 g_browser_compositor_count += 1;
175 175
176 root_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR)); 176 root_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR));
177 delegated_frame_host_.reset(new DelegatedFrameHost(this)); 177 ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
178 delegated_frame_host_.reset(new DelegatedFrameHost(
179 factory->GetContextFactory()->AllocateFrameSinkId(), this));
178 180
179 SetRenderWidgetHostIsHidden(render_widget_host_is_hidden); 181 SetRenderWidgetHostIsHidden(render_widget_host_is_hidden);
180 SetNSViewAttachedToWindow(ns_view_attached_to_window); 182 SetNSViewAttachedToWindow(ns_view_attached_to_window);
181 } 183 }
182 184
183 BrowserCompositorMac::~BrowserCompositorMac() { 185 BrowserCompositorMac::~BrowserCompositorMac() {
184 // Ensure that copy callbacks completed or cancelled during further tear-down 186 // Ensure that copy callbacks completed or cancelled during further tear-down
185 // do not call back into this. 187 // do not call back into this.
186 weak_factory_.InvalidateWeakPtrs(); 188 weak_factory_.InvalidateWeakPtrs();
187 189
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 472
471 const cc::BeginFrameArgs& BrowserCompositorMac::LastUsedBeginFrameArgs() const { 473 const cc::BeginFrameArgs& BrowserCompositorMac::LastUsedBeginFrameArgs() const {
472 return last_begin_frame_args_; 474 return last_begin_frame_args_;
473 } 475 }
474 476
475 void BrowserCompositorMac::OnBeginFrameSourcePausedChanged(bool paused) { 477 void BrowserCompositorMac::OnBeginFrameSourcePausedChanged(bool paused) {
476 // Only used on Android WebView. 478 // Only used on Android WebView.
477 } 479 }
478 480
479 } // namespace content 481 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_widget_host_view_guest.cc ('k') | content/browser/renderer_host/compositor_impl_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698