OLD | NEW |
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 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1040 return new BackingStoreGtk(host_, size, | 1040 return new BackingStoreGtk(host_, size, |
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) { |
| 1052 if (readback_config_rgb565) { |
| 1053 NOTIMPLEMENTED(); |
| 1054 callback.Run(false, SkBitmap()); |
| 1055 } |
1051 // 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 |
1052 // readback from the GPU for this platform right now. | 1057 // readback from the GPU for this platform right now. |
1053 GetRenderWidgetHost()->GetSnapshotFromRenderer(src_subrect, callback); | 1058 GetRenderWidgetHost()->GetSnapshotFromRenderer(src_subrect, callback); |
1054 } | 1059 } |
1055 | 1060 |
1056 void RenderWidgetHostViewGtk::CopyFromCompositingSurfaceToVideoFrame( | 1061 void RenderWidgetHostViewGtk::CopyFromCompositingSurfaceToVideoFrame( |
1057 const gfx::Rect& src_subrect, | 1062 const gfx::Rect& src_subrect, |
1058 const scoped_refptr<media::VideoFrame>& target, | 1063 const scoped_refptr<media::VideoFrame>& target, |
1059 const base::Callback<void(bool)>& callback) { | 1064 const base::Callback<void(bool)>& callback) { |
1060 NOTIMPLEMENTED(); | 1065 NOTIMPLEMENTED(); |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1601 gfx::PluginWindowHandle id) { | 1606 gfx::PluginWindowHandle id) { |
1602 plugin_container_manager_.CreatePluginContainer(id); | 1607 plugin_container_manager_.CreatePluginContainer(id); |
1603 } | 1608 } |
1604 | 1609 |
1605 void RenderWidgetHostViewGtk::OnDestroyPluginContainer( | 1610 void RenderWidgetHostViewGtk::OnDestroyPluginContainer( |
1606 gfx::PluginWindowHandle id) { | 1611 gfx::PluginWindowHandle id) { |
1607 plugin_container_manager_.DestroyPluginContainer(id); | 1612 plugin_container_manager_.DestroyPluginContainer(id); |
1608 } | 1613 } |
1609 | 1614 |
1610 } // namespace content | 1615 } // namespace content |
OLD | NEW |