summaryrefslogtreecommitdiff
path: root/chromium/content/browser/compositor/surface_utils.h
blob: 92bfe5786d5574a4caead4c2ac88d23f2523f6bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright 2015 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_COMPOSITOR_SURFACE_UTILS_H_
#define CONTENT_BROWSER_COMPOSITOR_SURFACE_UTILS_H_

#include <memory>

#include "content/common/content_export.h"
#include "content/public/browser/readback_types.h"
#include "third_party/skia/include/core/SkImageInfo.h"
#include "ui/gfx/geometry/size.h"

namespace cc {
class CopyOutputResult;
class SurfaceIdAllocator;
class SurfaceManager;
}  // namespace cc

namespace content {

CONTENT_EXPORT
std::unique_ptr<cc::SurfaceIdAllocator> CreateSurfaceIdAllocator();

CONTENT_EXPORT
cc::SurfaceManager* GetSurfaceManager();

void CopyFromCompositingSurfaceHasResult(
    const gfx::Size& dst_size_in_pixel,
    const SkColorType color_type,
    const ReadbackRequestCallback& callback,
    std::unique_ptr<cc::CopyOutputResult> result);

}  // namespace content

#endif  // CONTENT_BROWSER_COMPOSITOR_SURFACE_UTILS_H_