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 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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) { | 1138 const SkBitmap::Config config) { |
1139 if (readback_config_rgb565) { | 1139 if (config == SkBitmap::kRGB_565_Config) { |
piman
2014/01/21 21:30:55
nit: config != SkBitmap::kARGB_8888_Config
sivag
2014/01/22 10:35:09
Done.
| |
1140 NOTIMPLEMENTED(); | 1140 NOTIMPLEMENTED(); |
1141 callback.Run(false, SkBitmap()); | 1141 callback.Run(false, SkBitmap()); |
1142 } | 1142 } |
1143 base::ScopedClosureRunner scoped_callback_runner( | 1143 base::ScopedClosureRunner scoped_callback_runner( |
1144 base::Bind(callback, false, SkBitmap())); | 1144 base::Bind(callback, false, SkBitmap())); |
1145 float scale = ScaleFactor(cocoa_view_); | 1145 float scale = ScaleFactor(cocoa_view_); |
1146 gfx::Size dst_pixel_size = gfx::ToFlooredSize( | 1146 gfx::Size dst_pixel_size = gfx::ToFlooredSize( |
1147 gfx::ScaleSize(dst_size, scale)); | 1147 gfx::ScaleSize(dst_size, scale)); |
1148 if (compositing_iosurface_ && compositing_iosurface_->HasIOSurface()) { | 1148 if (compositing_iosurface_ && compositing_iosurface_->HasIOSurface()) { |
1149 ignore_result(scoped_callback_runner.Release()); | 1149 ignore_result(scoped_callback_runner.Release()); |
(...skipping 2838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3988 return YES; | 3988 return YES; |
3989 } | 3989 } |
3990 | 3990 |
3991 - (BOOL)isOpaque { | 3991 - (BOOL)isOpaque { |
3992 if (renderWidgetHostView_->use_core_animation_) | 3992 if (renderWidgetHostView_->use_core_animation_) |
3993 return YES; | 3993 return YES; |
3994 return [super isOpaque]; | 3994 return [super isOpaque]; |
3995 } | 3995 } |
3996 | 3996 |
3997 @end | 3997 @end |
OLD | NEW |