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_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 } | 496 } |
497 | 497 |
498 void RenderWidgetHostImpl::CopyFromBackingStore( | 498 void RenderWidgetHostImpl::CopyFromBackingStore( |
499 const gfx::Rect& src_subrect, | 499 const gfx::Rect& src_subrect, |
500 const gfx::Size& accelerated_dst_size, | 500 const gfx::Size& accelerated_dst_size, |
501 const base::Callback<void(bool)>& callback, | 501 const base::Callback<void(bool)>& callback, |
502 skia::PlatformCanvas* output) { | 502 skia::PlatformCanvas* output) { |
503 if (view_ && is_accelerated_compositing_active_) { | 503 if (view_ && is_accelerated_compositing_active_) { |
504 TRACE_EVENT0("browser", | 504 TRACE_EVENT0("browser", |
505 "RenderWidgetHostImpl::CopyFromBackingStore::FromCompositingSurface"); | 505 "RenderWidgetHostImpl::CopyFromBackingStore::FromCompositingSurface"); |
506 #if defined(USE_AURA) || defined(LINUX) | 506 #if defined(USE_AURA) || defined(OS_LINUX) |
507 gfx::Rect copy_rect = src_subrect.IsEmpty() ? | 507 gfx::Rect copy_rect = src_subrect.IsEmpty() ? |
508 gfx::Rect(view_->GetViewBounds().size()) : src_subrect; | 508 gfx::Rect(view_->GetViewBounds().size()) : src_subrect; |
509 #else | 509 #else |
510 // Just passes an empty rect to CopyFromCompositingSurface on non-Aura Win | 510 // Just passes an empty rect to CopyFromCompositingSurface on non-Aura Win |
511 // and Mac because copying a partial rectangle is not supported. | 511 // and Mac because copying a partial rectangle is not supported. |
512 gfx::Rect copy_rect; | 512 gfx::Rect copy_rect; |
513 #endif | 513 #endif |
514 view_->CopyFromCompositingSurface(copy_rect, | 514 view_->CopyFromCompositingSurface(copy_rect, |
515 accelerated_dst_size, | 515 accelerated_dst_size, |
516 callback, | 516 callback, |
(...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1925 // indicate that no callback is in progress (i.e. without this line | 1925 // indicate that no callback is in progress (i.e. without this line |
1926 // DelayedAutoResized will not get called again). | 1926 // DelayedAutoResized will not get called again). |
1927 new_auto_size_.SetSize(0, 0); | 1927 new_auto_size_.SetSize(0, 0); |
1928 if (!should_auto_resize_) | 1928 if (!should_auto_resize_) |
1929 return; | 1929 return; |
1930 | 1930 |
1931 OnRenderAutoResized(new_size); | 1931 OnRenderAutoResized(new_size); |
1932 } | 1932 } |
1933 | 1933 |
1934 } // namespace content | 1934 } // namespace content |
OLD | NEW |