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

Side by Side Diff: content/browser/readback_request_helpers.h

Issue 1582053002: Implement webview.captureVisibleRegion() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move captureVisibleRegion() to experimental API. Created 4 years, 11 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_READBACK_REQUEST_HELPERS_H_
6 #define CONTENT_BROWSER_READBACK_REQUEST_HELPERS_H_
Charlie Reis 2016/01/19 22:45:36 As a non-graphics person, "readback" isn't an obvi
ncarter (slow) 2016/01/20 00:16:18 'Readback' as a term is already part of the conten
wjmaclean 2016/01/20 15:32:36 Acknowledged.
wjmaclean 2016/01/20 15:32:36 Acknowledged.
7
8 #include "base/memory/scoped_ptr.h"
9 #include "content/public/browser/readback_types.h"
10 #include "third_party/skia/include/core/SkImageInfo.h"
11 #include "ui/gfx/geometry/size.h"
12
13 class SkAutoLockPixels;
14 class SkBitmap;
15
16 namespace cc {
17 class CopyOutputResult;
18 class SingleReleaseCallback;
19 }
20
21 namespace content {
Charlie Reis 2016/01/19 22:45:36 Having this float around the content namespace see
kenrb 2016/01/20 01:43:04 DelegatedFrameHost manages compositor frame state
wjmaclean 2016/01/20 15:32:36 We could consider making content::surface_utils or
22
23 void CopyFromCompositingSurfaceFinished(
ncarter (slow) 2016/01/20 00:16:18 This is just a helper used to implement PrepareTex
wjmaclean 2016/01/20 15:32:36 Done.
24 const ReadbackRequestCallback& callback,
25 scoped_ptr<cc::SingleReleaseCallback> release_callback,
26 scoped_ptr<SkBitmap> bitmap,
27 scoped_ptr<SkAutoLockPixels> bitmap_pixels_lock,
28 bool result);
ncarter (slow) 2016/01/20 00:16:18 Functions in a big namespace like 'content' hurt r
wjmaclean 2016/01/20 15:32:36 The functions all appear to be stateless, though t
29
30 void PrepareTextureCopyOutputResult(const gfx::Size& dst_size_in_pixel,
ncarter (slow) 2016/01/20 00:16:18 Similar to CopyFromCompositingSurfaceFinished, Pre
31 const SkColorType color_type,
32 const ReadbackRequestCallback& callback,
33 scoped_ptr<cc::CopyOutputResult> result);
34
35 void PrepareBitmapCopyOutputResult(const gfx::Size& dst_size_in_pixel,
36 const SkColorType preferred_color_type,
37 const ReadbackRequestCallback& callback,
38 scoped_ptr<cc::CopyOutputResult> result);
39
40 void CopyFromCompositingSurfaceHasResult(
ncarter (slow) 2016/01/20 00:16:19 My interpretation is that the reusable functionali
wjmaclean 2016/01/20 15:32:36 Acknowledged.
41 const gfx::Size& dst_size_in_pixel,
42 const SkColorType color_type,
43 const ReadbackRequestCallback& callback,
44 scoped_ptr<cc::CopyOutputResult> result);
ncarter (slow) 2016/01/20 00:16:18 += blank line
wjmaclean 2016/01/20 15:32:36 Done.
45 }
ncarter (slow) 2016/01/20 00:16:18 } // namespace content
wjmaclean 2016/01/20 15:32:36 Done.
46
47 #endif // CONTENT_BROWSER_READBACK_REQUEST_HELPERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698