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

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

Issue 337303003: CARemoteLayer alive-ish (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/render_widget_host_view_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #import <objc/runtime.h> 7 #import <objc/runtime.h>
8 #include <QuartzCore/QuartzCore.h> 8 #include <QuartzCore/QuartzCore.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 *results = GetWebScreenInfo(NULL); 443 *results = GetWebScreenInfo(NULL);
444 } 444 }
445 445
446 /////////////////////////////////////////////////////////////////////////////// 446 ///////////////////////////////////////////////////////////////////////////////
447 // RenderWidgetHostViewMac, public: 447 // RenderWidgetHostViewMac, public:
448 448
449 RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget) 449 RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget)
450 : render_widget_host_(RenderWidgetHostImpl::From(widget)), 450 : render_widget_host_(RenderWidgetHostImpl::From(widget)),
451 text_input_type_(ui::TEXT_INPUT_TYPE_NONE), 451 text_input_type_(ui::TEXT_INPUT_TYPE_NONE),
452 can_compose_inline_(true), 452 can_compose_inline_(true),
453 remote_context_id_(0),
453 pending_latency_info_delay_(0), 454 pending_latency_info_delay_(0),
454 pending_latency_info_delay_weak_ptr_factory_(this), 455 pending_latency_info_delay_weak_ptr_factory_(this),
455 backing_store_scale_factor_(1), 456 backing_store_scale_factor_(1),
456 is_loading_(false), 457 is_loading_(false),
457 weak_factory_(this), 458 weak_factory_(this),
458 fullscreen_parent_host_view_(NULL), 459 fullscreen_parent_host_view_(NULL),
459 overlay_view_weak_factory_(this), 460 overlay_view_weak_factory_(this),
460 software_frame_weak_ptr_factory_(this) { 461 software_frame_weak_ptr_factory_(this) {
461 software_frame_manager_.reset(new SoftwareFrameManager( 462 software_frame_manager_.reset(new SoftwareFrameManager(
462 software_frame_weak_ptr_factory_.GetWeakPtr())); 463 software_frame_weak_ptr_factory_.GetWeakPtr()));
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1658 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, 1659 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params,
1659 int gpu_host_id) { 1660 int gpu_host_id) {
1660 TRACE_EVENT0("browser", 1661 TRACE_EVENT0("browser",
1661 "RenderWidgetHostViewMac::AcceleratedSurfaceBuffersSwapped"); 1662 "RenderWidgetHostViewMac::AcceleratedSurfaceBuffersSwapped");
1662 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1663 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1663 1664
1664 AddPendingSwapAck(params.route_id, 1665 AddPendingSwapAck(params.route_id,
1665 gpu_host_id, 1666 gpu_host_id,
1666 compositing_iosurface_ ? 1667 compositing_iosurface_ ?
1667 compositing_iosurface_->GetRendererID() : 0); 1668 compositing_iosurface_->GetRendererID() : 0);
1669
1670
1671 if (params.ca_context_id) {
1672 if (params.ca_context_id != remote_context_id_) {
1673 remote_context_id_ = params.ca_context_id;
1674 CALayerHost* layer_host = [[CALayerHost alloc] init];
1675 CHECK(layer_host);
1676 [layer_host setContextId:remote_context_id_];
1677 [background_layer_ addSublayer:layer_host];
1678 }
1679 SendPendingSwapAck();
1680 return;
1681 }
1682
1668 CompositorSwapBuffers(params.surface_handle, 1683 CompositorSwapBuffers(params.surface_handle,
1669 params.size, 1684 params.size,
1670 params.scale_factor, 1685 params.scale_factor,
1671 params.latency_info); 1686 params.latency_info);
1672 } 1687 }
1673 1688
1674 void RenderWidgetHostViewMac::AcceleratedSurfacePostSubBuffer( 1689 void RenderWidgetHostViewMac::AcceleratedSurfacePostSubBuffer(
1675 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, 1690 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params,
1676 int gpu_host_id) { 1691 int gpu_host_id) {
1677 TRACE_EVENT0("browser", 1692 TRACE_EVENT0("browser",
(...skipping 2246 matching lines...) Expand 10 before | Expand all | Expand 10 after
3924 3939
3925 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3940 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3926 // regions that are not draggable. (See ControlRegionView in 3941 // regions that are not draggable. (See ControlRegionView in
3927 // native_app_window_cocoa.mm). This requires the render host view to be 3942 // native_app_window_cocoa.mm). This requires the render host view to be
3928 // draggable by default. 3943 // draggable by default.
3929 - (BOOL)mouseDownCanMoveWindow { 3944 - (BOOL)mouseDownCanMoveWindow {
3930 return YES; 3945 return YES;
3931 } 3946 }
3932 3947
3933 @end 3948 @end
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.h ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698