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

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

Issue 176943004: [Android] Implement asynchronous zero-copy bitmap capture API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 BackingStore* RenderWidgetHostViewMac::AllocBackingStore( 1177 BackingStore* RenderWidgetHostViewMac::AllocBackingStore(
1178 const gfx::Size& size) { 1178 const gfx::Size& size) {
1179 float scale = ScaleFactorForView(cocoa_view_); 1179 float scale = ScaleFactorForView(cocoa_view_);
1180 return new BackingStoreMac(render_widget_host_, size, scale); 1180 return new BackingStoreMac(render_widget_host_, size, scale);
1181 } 1181 }
1182 1182
1183 void RenderWidgetHostViewMac::CopyFromCompositingSurface( 1183 void RenderWidgetHostViewMac::CopyFromCompositingSurface(
1184 const gfx::Rect& src_subrect, 1184 const gfx::Rect& src_subrect,
1185 const gfx::Size& dst_size, 1185 const gfx::Size& dst_size,
1186 const base::Callback<void(bool, const SkBitmap&)>& callback, 1186 const base::Callback<void(bool, const SkBitmap&)>& callback,
1187 const SkBitmap::Config config) { 1187 const SkBitmap::Config config,
1188 scoped_ptr<SkBitmap> bitmap) {
1188 if (config != SkBitmap::kARGB_8888_Config) { 1189 if (config != SkBitmap::kARGB_8888_Config) {
1189 NOTIMPLEMENTED(); 1190 NOTIMPLEMENTED();
1190 callback.Run(false, SkBitmap()); 1191 callback.Run(false, SkBitmap());
1191 } 1192 }
1192 base::ScopedClosureRunner scoped_callback_runner( 1193 base::ScopedClosureRunner scoped_callback_runner(
1193 base::Bind(callback, false, SkBitmap())); 1194 base::Bind(callback, false, SkBitmap()));
1194 float scale = ScaleFactorForView(cocoa_view_); 1195 float scale = ScaleFactorForView(cocoa_view_);
1195 gfx::Size dst_pixel_size = gfx::ToFlooredSize( 1196 gfx::Size dst_pixel_size = gfx::ToFlooredSize(
1196 gfx::ScaleSize(dst_size, scale)); 1197 gfx::ScaleSize(dst_size, scale));
1197 if (compositing_iosurface_ && compositing_iosurface_->HasIOSurface()) { 1198 if (compositing_iosurface_ && compositing_iosurface_->HasIOSurface()) {
(...skipping 2943 matching lines...) Expand 10 before | Expand all | Expand 10 after
4141 return YES; 4142 return YES;
4142 } 4143 }
4143 4144
4144 - (BOOL)isOpaque { 4145 - (BOOL)isOpaque {
4145 if (renderWidgetHostView_->use_core_animation_) 4146 if (renderWidgetHostView_->use_core_animation_)
4146 return YES; 4147 return YES;
4147 return [super isOpaque]; 4148 return [super isOpaque];
4148 } 4149 }
4149 4150
4150 @end 4151 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698