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

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 11269017: Plumb through cropped output size for VideoFrame (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: Now with passing unittest!wq Created 8 years, 1 month 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 "webkit/plugins/ppapi/ppapi_plugin_instance.h" 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 2766 matching lines...) Expand 10 before | Expand all | Expand 10 after
2777 const uint8* frame_data = static_cast<uint8*>(mapper.data()); 2777 const uint8* frame_data = static_cast<uint8*>(mapper.data());
2778 gfx::Size frame_size(frame_info->width, frame_info->height); 2778 gfx::Size frame_size(frame_info->width, frame_info->height);
2779 2779
2780 DCHECK(frame_info->format == PP_DECRYPTEDFRAMEFORMAT_YV12); 2780 DCHECK(frame_info->format == PP_DECRYPTEDFRAMEFORMAT_YV12);
2781 const media::VideoFrame::Format format = media::VideoFrame::YV12; 2781 const media::VideoFrame::Format format = media::VideoFrame::YV12;
2782 2782
2783 // TODO(tomfinegan): Find a way to take ownership of the shared memory 2783 // TODO(tomfinegan): Find a way to take ownership of the shared memory
2784 // managed by the PPB_Buffer_Dev, and avoid the extra copy. 2784 // managed by the PPB_Buffer_Dev, and avoid the extra copy.
2785 scoped_refptr<media::VideoFrame> decoded_frame( 2785 scoped_refptr<media::VideoFrame> decoded_frame(
2786 media::VideoFrame::CreateFrame( 2786 media::VideoFrame::CreateFrame(
2787 format, frame_size, frame_size, 2787 format, frame_size, gfx::Rect(frame_size), frame_size,
2788 base::TimeDelta::FromMicroseconds( 2788 base::TimeDelta::FromMicroseconds(
2789 frame_info->tracking_info.timestamp))); 2789 frame_info->tracking_info.timestamp)));
2790 2790
2791 media::CopyYPlane( 2791 media::CopyYPlane(
2792 frame_data + frame_info->plane_offsets[PP_DECRYPTEDFRAMEPLANES_Y], 2792 frame_data + frame_info->plane_offsets[PP_DECRYPTEDFRAMEPLANES_Y],
2793 frame_info->strides[PP_DECRYPTEDFRAMEPLANES_Y], 2793 frame_info->strides[PP_DECRYPTEDFRAMEPLANES_Y],
2794 frame_info->height, 2794 frame_info->height,
2795 decoded_frame.get()); 2795 decoded_frame.get());
2796 2796
2797 media::CopyUPlane( 2797 media::CopyUPlane(
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
3226 screen_size_for_fullscreen_ = gfx::Size(); 3226 screen_size_for_fullscreen_ = gfx::Size();
3227 WebElement element = container_->element(); 3227 WebElement element = container_->element();
3228 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); 3228 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_);
3229 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); 3229 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_);
3230 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); 3230 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_);
3231 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); 3231 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_);
3232 } 3232 }
3233 3233
3234 } // namespace ppapi 3234 } // namespace ppapi
3235 } // namespace webkit 3235 } // namespace webkit
OLDNEW
« media/filters/skcanvas_video_renderer_unittest.cc ('K') | « webkit/media/webvideoframe_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698