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

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

Issue 12090109: Tab Capture: Backing store readbacks to YV12 VideoFrames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style fix per wjia Created 7 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 | Annotate | Revision Log
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/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 gfx::Rect src_subrect_in_pixel = ConvertRectToPixel(this, src_subrect_in_gl); 750 gfx::Rect src_subrect_in_pixel = ConvertRectToPixel(this, src_subrect_in_gl);
751 gl_helper->CropScaleReadbackAndCleanTexture( 751 gl_helper->CropScaleReadbackAndCleanTexture(
752 current_surface_->PrepareTexture(), 752 current_surface_->PrepareTexture(),
753 current_surface_->size(), 753 current_surface_->size(),
754 src_subrect_in_pixel, 754 src_subrect_in_pixel,
755 dst_size_in_pixel, 755 dst_size_in_pixel,
756 addr, 756 addr,
757 wrapper_callback); 757 wrapper_callback);
758 } 758 }
759 759
760 void RenderWidgetHostViewAura::CopyFromCompositingSurfaceToVideoFrame(
761 const gfx::Rect& src_subrect,
762 const scoped_refptr<media::VideoFrame>& target,
763 const base::Callback<void(bool)>& callback) {
764 NOTIMPLEMENTED();
765 callback.Run(false);
766 }
767
768 bool RenderWidgetHostViewAura::CanCopyToVideoFrame() const {
769 return false;
770 }
771
760 void RenderWidgetHostViewAura::OnAcceleratedCompositingStateChange() { 772 void RenderWidgetHostViewAura::OnAcceleratedCompositingStateChange() {
761 // Delay processing the state change until we either get a software frame if 773 // Delay processing the state change until we either get a software frame if
762 // switching to software mode or receive a buffers swapped notification 774 // switching to software mode or receive a buffers swapped notification
763 // if switching to accelerated mode. 775 // if switching to accelerated mode.
764 // Sometimes (e.g. on a page load) the renderer will spuriously disable then 776 // Sometimes (e.g. on a page load) the renderer will spuriously disable then
765 // re-enable accelerated compositing, causing us to flash. 777 // re-enable accelerated compositing, causing us to flash.
766 // TODO(piman): factor the enable/disable accelerated compositing message into 778 // TODO(piman): factor the enable/disable accelerated compositing message into
767 // the UpdateRect/AcceleratedSurfaceBuffersSwapped messages so that we have 779 // the UpdateRect/AcceleratedSurfaceBuffersSwapped messages so that we have
768 // fewer inconsistent temporary states. 780 // fewer inconsistent temporary states.
769 accelerated_compositing_state_changed_ = true; 781 accelerated_compositing_state_changed_ = true;
(...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after
2042 RenderWidgetHost* widget) { 2054 RenderWidgetHost* widget) {
2043 return new RenderWidgetHostViewAura(widget); 2055 return new RenderWidgetHostViewAura(widget);
2044 } 2056 }
2045 2057
2046 // static 2058 // static
2047 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 2059 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
2048 GetScreenInfoForWindow(results, NULL); 2060 GetScreenInfoForWindow(results, NULL);
2049 } 2061 }
2050 2062
2051 } // namespace content 2063 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698