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

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

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_gtk.h" 5 #include "content/browser/renderer_host/render_widget_host_view_gtk.h"
6 6
7 #include <cairo/cairo.h> 7 #include <cairo/cairo.h>
8 #include <gdk/gdk.h> 8 #include <gdk/gdk.h>
9 #include <gdk/gdkkeysyms.h> 9 #include <gdk/gdkkeysyms.h>
10 #include <gdk/gdkx.h> 10 #include <gdk/gdkx.h>
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 ui::GetVisualFromGtkWidget(view_.get()), 1041 ui::GetVisualFromGtkWidget(view_.get()),
1042 depth); 1042 depth);
1043 } 1043 }
1044 1044
1045 // NOTE: |output| is initialized with the size of |src_subrect|, and |dst_size| 1045 // NOTE: |output| is initialized with the size of |src_subrect|, and |dst_size|
1046 // is ignored on GTK. 1046 // is ignored on GTK.
1047 void RenderWidgetHostViewGtk::CopyFromCompositingSurface( 1047 void RenderWidgetHostViewGtk::CopyFromCompositingSurface(
1048 const gfx::Rect& src_subrect, 1048 const gfx::Rect& src_subrect,
1049 const gfx::Size& /* dst_size */, 1049 const gfx::Size& /* dst_size */,
1050 const base::Callback<void(bool, const SkBitmap&)>& callback, 1050 const base::Callback<void(bool, const SkBitmap&)>& callback,
1051 bool readback_config_rgb565) { 1051 SkBitmap::Config config) {
1052 if (readback_config_rgb565) { 1052 if (config != SkBitmap::kARGB_8888_Config) {
1053 NOTIMPLEMENTED(); 1053 NOTIMPLEMENTED();
1054 callback.Run(false, SkBitmap()); 1054 callback.Run(false, SkBitmap());
1055 } 1055 }
1056 // Grab the snapshot from the renderer as that's the only reliable way to 1056 // Grab the snapshot from the renderer as that's the only reliable way to
1057 // readback from the GPU for this platform right now. 1057 // readback from the GPU for this platform right now.
1058 GetRenderWidgetHost()->GetSnapshotFromRenderer(src_subrect, callback); 1058 GetRenderWidgetHost()->GetSnapshotFromRenderer(src_subrect, callback);
1059 } 1059 }
1060 1060
1061 void RenderWidgetHostViewGtk::CopyFromCompositingSurfaceToVideoFrame( 1061 void RenderWidgetHostViewGtk::CopyFromCompositingSurfaceToVideoFrame(
1062 const gfx::Rect& src_subrect, 1062 const gfx::Rect& src_subrect,
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 gfx::PluginWindowHandle id) { 1606 gfx::PluginWindowHandle id) {
1607 plugin_container_manager_.CreatePluginContainer(id); 1607 plugin_container_manager_.CreatePluginContainer(id);
1608 } 1608 }
1609 1609
1610 void RenderWidgetHostViewGtk::OnDestroyPluginContainer( 1610 void RenderWidgetHostViewGtk::OnDestroyPluginContainer(
1611 gfx::PluginWindowHandle id) { 1611 gfx::PluginWindowHandle id) {
1612 plugin_container_manager_.DestroyPluginContainer(id); 1612 plugin_container_manager_.DestroyPluginContainer(id);
1613 } 1613 }
1614 1614
1615 } // namespace content 1615 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698