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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_base.h

Issue 802343002: Add ability to copy unscaled output pixels. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
7 7
8 #if defined(OS_MACOSX) 8 #if defined(OS_MACOSX)
9 #include <OpenGL/OpenGL.h> 9 #include <OpenGL/OpenGL.h>
10 #endif 10 #endif
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 // Notifies the View that the renderer selection bounds has changed. 249 // Notifies the View that the renderer selection bounds has changed.
250 // |start_rect| and |end_rect| are the bounds end of the selection in the 250 // |start_rect| and |end_rect| are the bounds end of the selection in the
251 // coordinate system of the render view. |start_direction| and |end_direction| 251 // coordinate system of the render view. |start_direction| and |end_direction|
252 // indicates the direction at which the selection was made on touch devices. 252 // indicates the direction at which the selection was made on touch devices.
253 virtual void SelectionBoundsChanged( 253 virtual void SelectionBoundsChanged(
254 const ViewHostMsg_SelectionBounds_Params& params) = 0; 254 const ViewHostMsg_SelectionBounds_Params& params) = 0;
255 255
256 // Copies the contents of the compositing surface, providing a new SkBitmap 256 // Copies the contents of the compositing surface, providing a new SkBitmap
257 // result via an asynchronously-run |callback|. |src_subrect| is specified in 257 // result via an asynchronously-run |callback|. |src_subrect| is specified in
258 // layer space coordinates for the current platform (e.g., DIP for Aura/Mac, 258 // layer space coordinates for the current platform (e.g., DIP for Aura/Mac,
259 // physical for Android), and is the region to be copied from this view. The 259 // physical for Android), and is the region to be copied from this view. When
260 // copy is then scaled to a SkBitmap of size |dst_size|. |callback| is run 260 // |src_subrect| is empty then the whole surface will be copied. The copy is
261 // with true on success, false otherwise. A smaller region than |src_subrect| 261 // then scaled to a SkBitmap of size |dst_size|. If |dst_size| is empty then
262 // may be copied if the underlying surface is smaller than |src_subrect|. 262 // output will be unscaled. |callback| is run with true on success,
263 // false otherwise. A smaller region than |src_subrect| may be copied
264 // if the underlying surface is smaller than |src_subrect|.
263 virtual void CopyFromCompositingSurface(const gfx::Rect& src_subrect, 265 virtual void CopyFromCompositingSurface(const gfx::Rect& src_subrect,
264 const gfx::Size& dst_size, 266 const gfx::Size& dst_size,
265 ReadbackRequestCallback& callback, 267 ReadbackRequestCallback& callback,
266 const SkColorType color_type) = 0; 268 const SkColorType color_type) = 0;
267 269
268 // Copies the contents of the compositing surface, populating the given 270 // Copies the contents of the compositing surface, populating the given
269 // |target| with YV12 image data. |src_subrect| is specified in layer space 271 // |target| with YV12 image data. |src_subrect| is specified in layer space
270 // coordinates for the current platform (e.g., DIP for Aura/Mac, physical for 272 // coordinates for the current platform (e.g., DIP for Aura/Mac, physical for
271 // Android), and is the region to be copied from this view. The copy is then 273 // Android), and is the region to be copied from this view. The copy is then
272 // scaled and letterboxed with black borders to fit |target|. Finally, 274 // scaled and letterboxed with black borders to fit |target|. Finally,
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_; 423 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_;
422 424
423 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; 425 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_;
424 426
425 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); 427 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase);
426 }; 428 };
427 429
428 } // namespace content 430 } // namespace content
429 431
430 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 432 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698