| 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 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 | 1127 |
| 1128 BackingStore* RenderWidgetHostViewMac::AllocBackingStore( | 1128 BackingStore* RenderWidgetHostViewMac::AllocBackingStore( |
| 1129 const gfx::Size& size) { | 1129 const gfx::Size& size) { |
| 1130 float scale = ScaleFactor(cocoa_view_); | 1130 float scale = ScaleFactor(cocoa_view_); |
| 1131 return new BackingStoreMac(render_widget_host_, size, scale); | 1131 return new BackingStoreMac(render_widget_host_, size, scale); |
| 1132 } | 1132 } |
| 1133 | 1133 |
| 1134 void RenderWidgetHostViewMac::CopyFromCompositingSurface( | 1134 void RenderWidgetHostViewMac::CopyFromCompositingSurface( |
| 1135 const gfx::Rect& src_subrect, | 1135 const gfx::Rect& src_subrect, |
| 1136 const gfx::Size& dst_size, | 1136 const gfx::Size& dst_size, |
| 1137 const base::Callback<void(bool, const SkBitmap&)>& callback) { | 1137 const base::Callback<void(bool, const SkBitmap&)>& callback, |
| 1138 bool readback_config_rgb565) { |
| 1139 if (readback_config_rgb565) { |
| 1140 NOTIMPLEMENTED(); |
| 1141 callback.Run(false, SkBitmap()); |
| 1142 } |
| 1138 base::ScopedClosureRunner scoped_callback_runner( | 1143 base::ScopedClosureRunner scoped_callback_runner( |
| 1139 base::Bind(callback, false, SkBitmap())); | 1144 base::Bind(callback, false, SkBitmap())); |
| 1140 float scale = ScaleFactor(cocoa_view_); | 1145 float scale = ScaleFactor(cocoa_view_); |
| 1141 gfx::Size dst_pixel_size = gfx::ToFlooredSize( | 1146 gfx::Size dst_pixel_size = gfx::ToFlooredSize( |
| 1142 gfx::ScaleSize(dst_size, scale)); | 1147 gfx::ScaleSize(dst_size, scale)); |
| 1143 if (compositing_iosurface_ && compositing_iosurface_->HasIOSurface()) { | 1148 if (compositing_iosurface_ && compositing_iosurface_->HasIOSurface()) { |
| 1144 ignore_result(scoped_callback_runner.Release()); | 1149 ignore_result(scoped_callback_runner.Release()); |
| 1145 compositing_iosurface_->CopyTo(GetScaledOpenGLPixelRect(src_subrect), | 1150 compositing_iosurface_->CopyTo(GetScaledOpenGLPixelRect(src_subrect), |
| 1146 dst_pixel_size, | 1151 dst_pixel_size, |
| 1147 callback); | 1152 callback); |
| (...skipping 2835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3983 return YES; | 3988 return YES; |
| 3984 } | 3989 } |
| 3985 | 3990 |
| 3986 - (BOOL)isOpaque { | 3991 - (BOOL)isOpaque { |
| 3987 if (renderWidgetHostView_->use_core_animation_) | 3992 if (renderWidgetHostView_->use_core_animation_) |
| 3988 return YES; | 3993 return YES; |
| 3989 return [super isOpaque]; | 3994 return [super isOpaque]; |
| 3990 } | 3995 } |
| 3991 | 3996 |
| 3992 @end | 3997 @end |
| OLD | NEW |