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

Side by Side Diff: content/public/browser/render_widget_host.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
« no previous file with comments | « content/port/browser/render_widget_host_view_port.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_
6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ 6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "content/public/browser/native_web_keyboard_event.h" 10 #include "content/public/browser/native_web_keyboard_event.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // otherwise, along with a SkBitmap containing the copied pixel data. 190 // otherwise, along with a SkBitmap containing the copied pixel data.
191 // 191 //
192 // NOTE: |callback| is called synchronously if the backing store is available. 192 // NOTE: |callback| is called synchronously if the backing store is available.
193 // When accelerated compositing is active, |callback| may be called 193 // When accelerated compositing is active, |callback| may be called
194 // asynchronously. 194 // asynchronously.
195 virtual void CopyFromBackingStore( 195 virtual void CopyFromBackingStore(
196 const gfx::Rect& src_rect, 196 const gfx::Rect& src_rect,
197 const gfx::Size& accelerated_dst_size, 197 const gfx::Size& accelerated_dst_size,
198 const base::Callback<void(bool, const SkBitmap&)>& callback, 198 const base::Callback<void(bool, const SkBitmap&)>& callback,
199 const SkBitmap::Config& bitmap_config) = 0; 199 const SkBitmap::Config& bitmap_config) = 0;
200 // Ensures that the view does not drop the backing store even when hidden.
201 virtual bool CanCopyFromBackingStore() = 0;
202 #if defined(OS_ANDROID)
203 virtual void LockBackingStore() = 0;
204 virtual void UnlockBackingStore() = 0;
205 #endif
200 #if defined(TOOLKIT_GTK) 206 #if defined(TOOLKIT_GTK)
201 // Paint the backing store into the target's |dest_rect|. 207 // Paint the backing store into the target's |dest_rect|.
202 virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect, 208 virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect,
203 GdkWindow* target) = 0; 209 GdkWindow* target) = 0;
204 #elif defined(OS_MACOSX) 210 #elif defined(OS_MACOSX)
205 virtual gfx::Size GetBackingStoreSize() = 0; 211 virtual gfx::Size GetBackingStoreSize() = 0;
206 virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect, 212 virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect,
207 CGContextRef target) = 0; 213 CGContextRef target) = 0;
208 #endif 214 #endif
209 215
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 // within content/. This method is necessary because 308 // within content/. This method is necessary because
303 // RenderWidgetHost is the root of a diamond inheritance pattern, so 309 // RenderWidgetHost is the root of a diamond inheritance pattern, so
304 // subclasses inherit it virtually, which removes our ability to 310 // subclasses inherit it virtually, which removes our ability to
305 // static_cast to the subclass. 311 // static_cast to the subclass.
306 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; 312 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0;
307 }; 313 };
308 314
309 } // namespace content 315 } // namespace content
310 316
311 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ 317 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_
OLDNEW
« no previous file with comments | « content/port/browser/render_widget_host_view_port.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698