Chromium Code Reviews| Index: content/browser/readback_request_helpers.h |
| diff --git a/content/browser/readback_request_helpers.h b/content/browser/readback_request_helpers.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e1a873c85c1a00b8fc0e6ba65d0f7134330a7349 |
| --- /dev/null |
| +++ b/content/browser/readback_request_helpers.h |
| @@ -0,0 +1,47 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_BROWSER_READBACK_REQUEST_HELPERS_H_ |
| +#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.
|
| + |
| +#include "base/memory/scoped_ptr.h" |
| +#include "content/public/browser/readback_types.h" |
| +#include "third_party/skia/include/core/SkImageInfo.h" |
| +#include "ui/gfx/geometry/size.h" |
| + |
| +class SkAutoLockPixels; |
| +class SkBitmap; |
| + |
| +namespace cc { |
| +class CopyOutputResult; |
| +class SingleReleaseCallback; |
| +} |
| + |
| +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
|
| + |
| +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.
|
| + const ReadbackRequestCallback& callback, |
| + scoped_ptr<cc::SingleReleaseCallback> release_callback, |
| + scoped_ptr<SkBitmap> bitmap, |
| + scoped_ptr<SkAutoLockPixels> bitmap_pixels_lock, |
| + 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
|
| + |
| +void PrepareTextureCopyOutputResult(const gfx::Size& dst_size_in_pixel, |
|
ncarter (slow)
2016/01/20 00:16:18
Similar to CopyFromCompositingSurfaceFinished, Pre
|
| + const SkColorType color_type, |
| + const ReadbackRequestCallback& callback, |
| + scoped_ptr<cc::CopyOutputResult> result); |
| + |
| +void PrepareBitmapCopyOutputResult(const gfx::Size& dst_size_in_pixel, |
| + const SkColorType preferred_color_type, |
| + const ReadbackRequestCallback& callback, |
| + scoped_ptr<cc::CopyOutputResult> result); |
| + |
| +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.
|
| + const gfx::Size& dst_size_in_pixel, |
| + const SkColorType color_type, |
| + const ReadbackRequestCallback& callback, |
| + scoped_ptr<cc::CopyOutputResult> result); |
|
ncarter (slow)
2016/01/20 00:16:18
+= blank line
wjmaclean
2016/01/20 15:32:36
Done.
|
| +} |
|
ncarter (slow)
2016/01/20 00:16:18
} // namespace content
wjmaclean
2016/01/20 15:32:36
Done.
|
| + |
| +#endif // CONTENT_BROWSER_READBACK_REQUEST_HELPERS_H_ |