OLD | NEW |
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 1873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1884 weak_factory_.InvalidateWeakPtrs(); | 1884 weak_factory_.InvalidateWeakPtrs(); |
1885 render_widget_host_->Shutdown(); | 1885 render_widget_host_->Shutdown(); |
1886 // Do not touch any members at this point, |this| has been deleted. | 1886 // Do not touch any members at this point, |this| has been deleted. |
1887 } | 1887 } |
1888 | 1888 |
1889 void RenderWidgetHostViewMac::GotAcceleratedFrame() { | 1889 void RenderWidgetHostViewMac::GotAcceleratedFrame() { |
1890 // Update the host with VSync parametrs. | 1890 // Update the host with VSync parametrs. |
1891 base::TimeTicks timebase; | 1891 base::TimeTicks timebase; |
1892 base::TimeDelta interval; | 1892 base::TimeDelta interval; |
1893 if (compositing_iosurface_context_ && | 1893 if (compositing_iosurface_context_ && |
| 1894 compositing_iosurface_context_->display_link() && |
1894 compositing_iosurface_context_->display_link()->GetVSyncParameters( | 1895 compositing_iosurface_context_->display_link()->GetVSyncParameters( |
1895 &timebase, &interval)) { | 1896 &timebase, &interval)) { |
1896 render_widget_host_->UpdateVSyncParameters(timebase, interval); | 1897 render_widget_host_->UpdateVSyncParameters(timebase, interval); |
1897 } | 1898 } |
1898 | 1899 |
1899 if (!last_frame_was_accelerated_) { | 1900 if (!last_frame_was_accelerated_) { |
1900 last_frame_was_accelerated_ = true; | 1901 last_frame_was_accelerated_ = true; |
1901 | 1902 |
1902 if (!use_core_animation_) { | 1903 if (!use_core_animation_) { |
1903 // Need to wipe the software view with transparency to expose the GL | 1904 // Need to wipe the software view with transparency to expose the GL |
(...skipping 2231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4135 return YES; | 4136 return YES; |
4136 } | 4137 } |
4137 | 4138 |
4138 - (BOOL)isOpaque { | 4139 - (BOOL)isOpaque { |
4139 if (renderWidgetHostView_->use_core_animation_) | 4140 if (renderWidgetHostView_->use_core_animation_) |
4140 return YES; | 4141 return YES; |
4141 return [super isOpaque]; | 4142 return [super isOpaque]; |
4142 } | 4143 } |
4143 | 4144 |
4144 @end | 4145 @end |
OLD | NEW |