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

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 changes as per review. 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 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::kARGB_8888_Config) {
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 2862 matching lines...) Expand 10 before | Expand all | Expand 10 after
4012 return YES; 4012 return YES;
4013 } 4013 }
4014 4014
4015 - (BOOL)isOpaque { 4015 - (BOOL)isOpaque {
4016 if (renderWidgetHostView_->use_core_animation_) 4016 if (renderWidgetHostView_->use_core_animation_)
4017 return YES; 4017 return YES;
4018 return [super isOpaque]; 4018 return [super isOpaque];
4019 } 4019 }
4020 4020
4021 @end 4021 @end
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.h ('k') | content/common/gpu/client/gl_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698