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

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

Issue 143683003: Support format using enum argument for Async readback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code changed as per review comments. Created 6 years, 11 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 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 BackingStore* RenderWidgetHostViewMac::AllocBackingStore( 1110 BackingStore* RenderWidgetHostViewMac::AllocBackingStore(
1111 const gfx::Size& size) { 1111 const gfx::Size& size) {
1112 float scale = ScaleFactor(cocoa_view_); 1112 float scale = ScaleFactor(cocoa_view_);
1113 return new BackingStoreMac(render_widget_host_, size, scale); 1113 return new BackingStoreMac(render_widget_host_, size, scale);
1114 } 1114 }
1115 1115
1116 void RenderWidgetHostViewMac::CopyFromCompositingSurface( 1116 void RenderWidgetHostViewMac::CopyFromCompositingSurface(
1117 const gfx::Rect& src_subrect, 1117 const gfx::Rect& src_subrect,
1118 const gfx::Size& dst_size, 1118 const gfx::Size& dst_size,
1119 const base::Callback<void(bool, const SkBitmap&)>& callback, 1119 const base::Callback<void(bool, const SkBitmap&)>& callback,
1120 bool readback_config_rgb565) { 1120 const SkBitmap::Config config) {
1121 if (readback_config_rgb565) { 1121 if (config != SkBitmap::kARGB_8888_Config) {
1122 NOTIMPLEMENTED(); 1122 NOTIMPLEMENTED();
1123 callback.Run(false, SkBitmap()); 1123 callback.Run(false, SkBitmap());
1124 } 1124 }
1125 base::ScopedClosureRunner scoped_callback_runner( 1125 base::ScopedClosureRunner scoped_callback_runner(
1126 base::Bind(callback, false, SkBitmap())); 1126 base::Bind(callback, false, SkBitmap()));
1127 float scale = ScaleFactor(cocoa_view_); 1127 float scale = ScaleFactor(cocoa_view_);
1128 gfx::Size dst_pixel_size = gfx::ToFlooredSize( 1128 gfx::Size dst_pixel_size = gfx::ToFlooredSize(
1129 gfx::ScaleSize(dst_size, scale)); 1129 gfx::ScaleSize(dst_size, scale));
1130 if (compositing_iosurface_ && compositing_iosurface_->HasIOSurface()) { 1130 if (compositing_iosurface_ && compositing_iosurface_->HasIOSurface()) {
1131 ignore_result(scoped_callback_runner.Release()); 1131 ignore_result(scoped_callback_runner.Release());
(...skipping 2849 matching lines...) Expand 10 before | Expand all | Expand 10 after
3981 return YES; 3981 return YES;
3982 } 3982 }
3983 3983
3984 - (BOOL)isOpaque { 3984 - (BOOL)isOpaque {
3985 if (renderWidgetHostView_->use_core_animation_) 3985 if (renderWidgetHostView_->use_core_animation_)
3986 return YES; 3986 return YES;
3987 return [super isOpaque]; 3987 return [super isOpaque];
3988 } 3988 }
3989 3989
3990 @end 3990 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698