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

Side by Side Diff: content/browser/compositor/delegated_frame_host.h

Issue 1412173003: cast: support cursor rendering for tab capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed left over logs Created 5 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_
6 #define CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_
7 7
8 #include <vector>
9
8 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
9 #include "cc/layers/delegated_frame_provider.h" 11 #include "cc/layers/delegated_frame_provider.h"
10 #include "cc/layers/delegated_frame_resource_collection.h" 12 #include "cc/layers/delegated_frame_resource_collection.h"
11 #include "cc/output/copy_output_result.h" 13 #include "cc/output/copy_output_result.h"
12 #include "cc/surfaces/surface_factory_client.h" 14 #include "cc/surfaces/surface_factory_client.h"
13 #include "content/browser/compositor/image_transport_factory.h" 15 #include "content/browser/compositor/image_transport_factory.h"
14 #include "content/browser/compositor/owned_mailbox.h" 16 #include "content/browser/compositor/owned_mailbox.h"
15 #include "content/browser/renderer_host/delegated_frame_evictor.h" 17 #include "content/browser/renderer_host/delegated_frame_evictor.h"
16 #include "content/browser/renderer_host/dip_util.h" 18 #include "content/browser/renderer_host/dip_util.h"
17 #include "content/browser/renderer_host/render_widget_host_impl.h" 19 #include "content/browser/renderer_host/render_widget_host_impl.h"
18 #include "content/browser/renderer_host/render_widget_host_view_base.h" 20 #include "content/browser/renderer_host/render_widget_host_view_base.h"
19 #include "content/public/browser/render_process_host.h" 21 #include "content/public/browser/render_process_host.h"
20 #include "ui/compositor/compositor.h" 22 #include "ui/compositor/compositor.h"
21 #include "ui/compositor/compositor_observer.h" 23 #include "ui/compositor/compositor_observer.h"
22 #include "ui/compositor/compositor_vsync_manager.h" 24 #include "ui/compositor/compositor_vsync_manager.h"
23 #include "ui/compositor/layer.h" 25 #include "ui/compositor/layer.h"
24 #include "ui/compositor/layer_owner_delegate.h" 26 #include "ui/compositor/layer_owner_delegate.h"
27 #include "ui/events/event.h"
25 #include "ui/gfx/geometry/rect_conversions.h" 28 #include "ui/gfx/geometry/rect_conversions.h"
26 29
27 namespace base { 30 namespace base {
28 class TickClock; 31 class TickClock;
29 } 32 }
30 33
31 namespace cc { 34 namespace cc {
32 class SurfaceFactory; 35 class SurfaceFactory;
33 enum class SurfaceDrawStatus; 36 enum class SurfaceDrawStatus;
34 } 37 }
35 38
36 namespace media { 39 namespace media {
37 class VideoFrame; 40 class VideoFrame;
38 } 41 }
39 42
40 namespace content { 43 namespace content {
41 44
42 class DelegatedFrameHost; 45 class DelegatedFrameHost;
43 class ReadbackYUVInterface; 46 class ReadbackYUVInterface;
44 class RenderWidgetHostViewFrameSubscriber; 47 class RenderWidgetHostViewFrameSubscriber;
45 class RenderWidgetHostImpl; 48 class RenderWidgetHostImpl;
46 class ResizeLock; 49 class ResizeLock;
47 50
48 // The DelegatedFrameHostClient is the interface from the DelegatedFrameHost, 51 // The DelegatedFrameHostClient is the interface from the DelegatedFrameHost,
49 // which manages delegated frames, and the ui::Compositor being used to 52 // which manages delegated frames, and the ui::Compositor being used to
50 // display them. 53 // display them.
51 class CONTENT_EXPORT DelegatedFrameHostClient { 54 class CONTENT_EXPORT DelegatedFrameHostClient {
52 public: 55 public:
53 virtual ui::Layer* DelegatedFrameHostGetLayer() const = 0; 56 virtual ui::Layer* DelegatedFrameHostGetLayer() const = 0;
57 virtual gfx::NativeView DelegatedFrameHostGetNativeView() const = 0;
54 virtual bool DelegatedFrameHostIsVisible() const = 0; 58 virtual bool DelegatedFrameHostIsVisible() const = 0;
55 virtual gfx::Size DelegatedFrameHostDesiredSizeInDIP() const = 0; 59 virtual gfx::Size DelegatedFrameHostDesiredSizeInDIP() const = 0;
56 60
57 virtual bool DelegatedFrameCanCreateResizeLock() const = 0; 61 virtual bool DelegatedFrameCanCreateResizeLock() const = 0;
58 virtual scoped_ptr<ResizeLock> DelegatedFrameHostCreateResizeLock( 62 virtual scoped_ptr<ResizeLock> DelegatedFrameHostCreateResizeLock(
59 bool defer_compositor_lock) = 0; 63 bool defer_compositor_lock) = 0;
60 virtual void DelegatedFrameHostResizeLockWasReleased() = 0; 64 virtual void DelegatedFrameHostResizeLockWasReleased() = 0;
61 65
62 virtual void DelegatedFrameHostSendCompositorSwapAck( 66 virtual void DelegatedFrameHostSendCompositorSwapAck(
63 int output_surface_id, 67 int output_surface_id,
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 const base::TimeDelta& interval); 145 const base::TimeDelta& interval);
142 // Note: |src_subset| is specified in DIP dimensions while |output_size| 146 // Note: |src_subset| is specified in DIP dimensions while |output_size|
143 // expects pixels. 147 // expects pixels.
144 void CopyFromCompositingSurface(const gfx::Rect& src_subrect, 148 void CopyFromCompositingSurface(const gfx::Rect& src_subrect,
145 const gfx::Size& output_size, 149 const gfx::Size& output_size,
146 const ReadbackRequestCallback& callback, 150 const ReadbackRequestCallback& callback,
147 const SkColorType preferred_color_type); 151 const SkColorType preferred_color_type);
148 void CopyFromCompositingSurfaceToVideoFrame( 152 void CopyFromCompositingSurfaceToVideoFrame(
149 const gfx::Rect& src_subrect, 153 const gfx::Rect& src_subrect,
150 const scoped_refptr<media::VideoFrame>& target, 154 const scoped_refptr<media::VideoFrame>& target,
151 const base::Callback<void(bool)>& callback); 155 const base::Callback<void(gfx::Rect, bool)>& callback);
152 bool CanCopyToVideoFrame() const; 156 bool CanCopyToVideoFrame() const;
153 void BeginFrameSubscription( 157 void BeginFrameSubscription(
154 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber); 158 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber);
155 void EndFrameSubscription(); 159 void EndFrameSubscription();
156 bool HasFrameSubscriber() const { return frame_subscriber_; } 160 bool HasFrameSubscriber() const { return frame_subscriber_; }
157 uint32_t GetSurfaceIdNamespace(); 161 uint32_t GetSurfaceIdNamespace();
158 // Returns a null SurfaceId if this DelegatedFrameHost has not yet created 162 // Returns a null SurfaceId if this DelegatedFrameHost has not yet created
159 // a compositor Surface. 163 // a compositor Surface.
160 cc::SurfaceId SurfaceIdAtPoint(const gfx::Point& point, 164 cc::SurfaceId SurfaceIdAtPoint(const gfx::Point& point,
161 gfx::Point* transformed_point); 165 gfx::Point* transformed_point);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 scoped_ptr<cc::CopyOutputResult> result); 225 scoped_ptr<cc::CopyOutputResult> result);
222 static void PrepareBitmapCopyOutputResult( 226 static void PrepareBitmapCopyOutputResult(
223 const gfx::Size& dst_size_in_pixel, 227 const gfx::Size& dst_size_in_pixel,
224 const SkColorType color_type, 228 const SkColorType color_type,
225 const ReadbackRequestCallback& callback, 229 const ReadbackRequestCallback& callback,
226 scoped_ptr<cc::CopyOutputResult> result); 230 scoped_ptr<cc::CopyOutputResult> result);
227 static void CopyFromCompositingSurfaceHasResultForVideo( 231 static void CopyFromCompositingSurfaceHasResultForVideo(
228 base::WeakPtr<DelegatedFrameHost> rwhva, 232 base::WeakPtr<DelegatedFrameHost> rwhva,
229 scoped_refptr<OwnedMailbox> subscriber_texture, 233 scoped_refptr<OwnedMailbox> subscriber_texture,
230 scoped_refptr<media::VideoFrame> video_frame, 234 scoped_refptr<media::VideoFrame> video_frame,
231 const base::Callback<void(bool)>& callback, 235 const base::Callback<void(gfx::Rect, bool)>& callback,
232 scoped_ptr<cc::CopyOutputResult> result); 236 scoped_ptr<cc::CopyOutputResult> result);
233 static void CopyFromCompositingSurfaceFinishedForVideo( 237 static void CopyFromCompositingSurfaceFinishedForVideo(
234 base::WeakPtr<DelegatedFrameHost> rwhva, 238 base::WeakPtr<DelegatedFrameHost> rwhva,
235 const base::Callback<void(bool)>& callback, 239 const base::Callback<void(bool)>& callback,
236 scoped_refptr<OwnedMailbox> subscriber_texture, 240 scoped_refptr<OwnedMailbox> subscriber_texture,
237 scoped_ptr<cc::SingleReleaseCallback> release_callback, 241 scoped_ptr<cc::SingleReleaseCallback> release_callback,
238 bool result); 242 bool result);
239 static void ReturnSubscriberTexture( 243 static void ReturnSubscriberTexture(
240 base::WeakPtr<DelegatedFrameHost> rwhva, 244 base::WeakPtr<DelegatedFrameHost> rwhva,
241 scoped_refptr<OwnedMailbox> subscriber_texture, 245 scoped_refptr<OwnedMailbox> subscriber_texture,
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 // YUV readback pipeline. 342 // YUV readback pipeline.
339 scoped_ptr<content::ReadbackYUVInterface> 343 scoped_ptr<content::ReadbackYUVInterface>
340 yuv_readback_pipeline_; 344 yuv_readback_pipeline_;
341 345
342 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; 346 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_;
343 }; 347 };
344 348
345 } // namespace content 349 } // namespace content
346 350
347 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ 351 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/compositor/delegated_frame_host.cc » ('j') | content/browser/media/capture/cursor_renderer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698