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

Side by Side Diff: content/port/browser/render_widget_host_view_port.h

Issue 174323003: Expose locks for CopyFromCompositingSurface/CopyFromBackingStore API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android clang bot try 2 Created 6 years, 9 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 (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 #ifndef CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ 5 #ifndef CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_
6 #define CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ 6 #define CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 // be initialized even on failure. 182 // be initialized even on failure.
183 // A smaller region than |src_subrect| may be copied if the underlying surface 183 // A smaller region than |src_subrect| may be copied if the underlying surface
184 // is smaller than |src_subrect|. 184 // is smaller than |src_subrect|.
185 // NOTE: |callback| is called asynchronously. 185 // NOTE: |callback| is called asynchronously.
186 virtual void CopyFromCompositingSurface( 186 virtual void CopyFromCompositingSurface(
187 const gfx::Rect& src_subrect, 187 const gfx::Rect& src_subrect,
188 const gfx::Size& dst_size, 188 const gfx::Size& dst_size,
189 const base::Callback<void(bool, const SkBitmap&)>& callback, 189 const base::Callback<void(bool, const SkBitmap&)>& callback,
190 const SkBitmap::Config config) = 0; 190 const SkBitmap::Config config) = 0;
191 191
192 // Instructs the view to not drop the surface even when the view is hidden.
193 virtual void LockCompositingSurface() = 0;
194 virtual void UnlockCompositingSurface() = 0;
195
192 // Copies a given subset of the compositing surface's content into a YV12 196 // Copies a given subset of the compositing surface's content into a YV12
193 // VideoFrame, and invokes a callback with a success/fail parameter. |target| 197 // VideoFrame, and invokes a callback with a success/fail parameter. |target|
194 // must contain an allocated, YV12 video frame of the intended size. If the 198 // must contain an allocated, YV12 video frame of the intended size. If the
195 // copy rectangle does not match |target|'s size, the copied content will be 199 // copy rectangle does not match |target|'s size, the copied content will be
196 // scaled and letterboxed with black borders. The copy will happen 200 // scaled and letterboxed with black borders. The copy will happen
197 // asynchronously. This operation will fail if there is no available 201 // asynchronously. This operation will fail if there is no available
198 // compositing surface. 202 // compositing surface.
199 virtual void CopyFromCompositingSurfaceToVideoFrame( 203 virtual void CopyFromCompositingSurfaceToVideoFrame(
200 const gfx::Rect& src_subrect, 204 const gfx::Rect& src_subrect,
201 const scoped_refptr<media::VideoFrame>& target, 205 const scoped_refptr<media::VideoFrame>& target,
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 357
354 // Returns an HWND that's given as the parent window for windowless Flash to 358 // Returns an HWND that's given as the parent window for windowless Flash to
355 // workaround crbug.com/301548. 359 // workaround crbug.com/301548.
356 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const = 0; 360 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const = 0;
357 #endif 361 #endif
358 }; 362 };
359 363
360 } // namespace content 364 } // namespace content
361 365
362 #endif // CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ 366 #endif // CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_base.cc ('k') | content/public/browser/render_widget_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698