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

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

Issue 137783022: Revert of Add RGB565 Texture readback support in gl_helper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
1143 base::ScopedClosureRunner scoped_callback_runner( 1138 base::ScopedClosureRunner scoped_callback_runner(
1144 base::Bind(callback, false, SkBitmap())); 1139 base::Bind(callback, false, SkBitmap()));
1145 float scale = ScaleFactor(cocoa_view_); 1140 float scale = ScaleFactor(cocoa_view_);
1146 gfx::Size dst_pixel_size = gfx::ToFlooredSize( 1141 gfx::Size dst_pixel_size = gfx::ToFlooredSize(
1147 gfx::ScaleSize(dst_size, scale)); 1142 gfx::ScaleSize(dst_size, scale));
1148 if (compositing_iosurface_ && compositing_iosurface_->HasIOSurface()) { 1143 if (compositing_iosurface_ && compositing_iosurface_->HasIOSurface()) {
1149 ignore_result(scoped_callback_runner.Release()); 1144 ignore_result(scoped_callback_runner.Release());
1150 compositing_iosurface_->CopyTo(GetScaledOpenGLPixelRect(src_subrect), 1145 compositing_iosurface_->CopyTo(GetScaledOpenGLPixelRect(src_subrect),
1151 dst_pixel_size, 1146 dst_pixel_size,
1152 callback); 1147 callback);
(...skipping 2835 matching lines...) Expand 10 before | Expand all | Expand 10 after
3988 return YES; 3983 return YES;
3989 } 3984 }
3990 3985
3991 - (BOOL)isOpaque { 3986 - (BOOL)isOpaque {
3992 if (renderWidgetHostView_->use_core_animation_) 3987 if (renderWidgetHostView_->use_core_animation_)
3993 return YES; 3988 return YES;
3994 return [super isOpaque]; 3989 return [super isOpaque];
3995 } 3990 }
3996 3991
3997 @end 3992 @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