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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

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_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 1082
1083 BackingStore* RenderWidgetHostViewAura::AllocBackingStore( 1083 BackingStore* RenderWidgetHostViewAura::AllocBackingStore(
1084 const gfx::Size& size) { 1084 const gfx::Size& size) {
1085 return new BackingStoreAura(host_, size); 1085 return new BackingStoreAura(host_, size);
1086 } 1086 }
1087 1087
1088 void RenderWidgetHostViewAura::CopyFromCompositingSurface( 1088 void RenderWidgetHostViewAura::CopyFromCompositingSurface(
1089 const gfx::Rect& src_subrect, 1089 const gfx::Rect& src_subrect,
1090 const gfx::Size& dst_size, 1090 const gfx::Size& dst_size,
1091 const base::Callback<void(bool, const SkBitmap&)>& callback, 1091 const base::Callback<void(bool, const SkBitmap&)>& callback,
1092 const SkBitmap::Config config) { 1092 const SkBitmap::Config config,
1093 scoped_ptr<SkBitmap> bitmap) {
1093 // Only ARGB888 and RGB565 supported as of now. 1094 // Only ARGB888 and RGB565 supported as of now.
1094 bool format_support = ((config == SkBitmap::kRGB_565_Config) || 1095 bool format_support = ((config == SkBitmap::kRGB_565_Config) ||
1095 (config == SkBitmap::kARGB_8888_Config)); 1096 (config == SkBitmap::kARGB_8888_Config));
1096 if (!format_support) { 1097 if (!format_support) {
1097 DCHECK(format_support); 1098 DCHECK(format_support);
1098 callback.Run(false, SkBitmap()); 1099 callback.Run(false, SkBitmap());
1099 return; 1100 return;
1100 } 1101 }
1101 if (!CanCopyToBitmap()) { 1102 if (!CanCopyToBitmap()) {
1102 callback.Run(false, SkBitmap()); 1103 callback.Run(false, SkBitmap());
(...skipping 2489 matching lines...) Expand 10 before | Expand all | Expand 10 after
3592 RenderWidgetHost* widget) { 3593 RenderWidgetHost* widget) {
3593 return new RenderWidgetHostViewAura(widget); 3594 return new RenderWidgetHostViewAura(widget);
3594 } 3595 }
3595 3596
3596 // static 3597 // static
3597 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 3598 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
3598 GetScreenInfoForWindow(results, NULL); 3599 GetScreenInfoForWindow(results, NULL);
3599 } 3600 }
3600 3601
3601 } // namespace content 3602 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698