summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authormazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-28 06:40:56 +0000
committermazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-28 06:40:56 +0000
commit4f64616589ce0aaae3d8eb933cc5a26d1e529f9b (patch)
tree129884ad26e46f2146af2b3c2ce1caeea79b179f /content
parent1d65f4851332253abd79619e25266e70a837e1df (diff)
downloadchromium_src-4f64616589ce0aaae3d8eb933cc5a26d1e529f9b.zip
chromium_src-4f64616589ce0aaae3d8eb933cc5a26d1e529f9b.tar.gz
chromium_src-4f64616589ce0aaae3d8eb933cc5a26d1e529f9b.tar.bz2
Support copying a partial rectangle region from the compositing surface on Win.
BUG=118571 TEST=Manual Review URL: https://chromiumcodereview.appspot.com/10829054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148889 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/renderer_host/render_widget_host_impl.cc6
-rw-r--r--content/browser/renderer_host/render_widget_host_view_win.cc11
2 files changed, 3 insertions, 14 deletions
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 9ad8be6..3b93544 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -503,14 +503,8 @@ void RenderWidgetHostImpl::CopyFromBackingStore(
if (view_ && is_accelerated_compositing_active_) {
TRACE_EVENT0("browser",
"RenderWidgetHostImpl::CopyFromBackingStore::FromCompositingSurface");
-#if defined(USE_AURA) || defined(OS_LINUX) || defined(OS_MACOSX)
gfx::Rect copy_rect = src_subrect.IsEmpty() ?
gfx::Rect(view_->GetViewBounds().size()) : src_subrect;
-#else
- // Just passes an empty rect to CopyFromCompositingSurface on non-Aura Win
- // because copying a partial rectangle is not supported.
- gfx::Rect copy_rect;
-#endif
view_->CopyFromCompositingSurface(copy_rect,
accelerated_dst_size,
callback,
diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc
index ba600e5..b0a06eb 100644
--- a/content/browser/renderer_host/render_widget_host_view_win.cc
+++ b/content/browser/renderer_host/render_widget_host_view_win.cc
@@ -1199,13 +1199,6 @@ void RenderWidgetHostViewWin::CopyFromCompositingSurface(
const base::Callback<void(bool)>& callback,
skia::PlatformCanvas* output) {
base::ScopedClosureRunner scoped_callback_runner(base::Bind(callback, false));
- // TODO(mazda): Support copying a partial rectangle from the compositing
- // surface with |src_subrect| (http://crbug.com/118571).
- if (!src_subrect.IsEmpty()) {
- NOTIMPLEMENTED();
- return;
- }
-
if (!accelerated_surface_.get())
return;
@@ -1216,7 +1209,9 @@ void RenderWidgetHostViewWin::CopyFromCompositingSurface(
return;
const bool result = accelerated_surface_->CopyTo(
- dst_size, output->getTopDevice()->accessBitmap(true).getPixels());
+ src_subrect,
+ dst_size,
+ output->getTopDevice()->accessBitmap(true).getPixels());
scoped_callback_runner.Release();
callback.Run(result);
}