~kdub/mir/mali-client-render-support

« back to all changes in this revision

Viewing changes to src/server/graphics/android/resource_factory.h

  • Committer: Kevin DuBois
  • Date: 2013-11-05 21:44:14 UTC
  • mfrom: (1062.1.137 dev)
  • Revision ID: kevin.dubois@canonical.com-20131105214414-d32r52joqrs8tsmo
merge dev branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
namespace android
33
33
{
34
34
 
35
 
class GraphicBufferAllocator;
36
 
class FBSwapper;
37
 
 
38
35
class ResourceFactory : public DisplayResourceFactory
39
36
{
40
37
public:
41
 
    explicit ResourceFactory(std::shared_ptr<GraphicBufferAllocator> const& buffer_allocator);
42
 
 
43
 
    std::shared_ptr<DisplaySupportProvider> create_fb_device() const;
44
 
 
45
 
    std::shared_ptr<DisplaySupportProvider> create_hwc_1_1(
46
 
        std::shared_ptr<hwc_composer_device_1> const& hwc_device,
47
 
        std::shared_ptr<DisplaySupportProvider> const& fb_device) const;
48
 
 
49
 
    std::shared_ptr<DisplaySupportProvider> create_hwc_1_0(
50
 
        std::shared_ptr<hwc_composer_device_1> const& hwc_device,
51
 
        std::shared_ptr<DisplaySupportProvider> const& fb_device) const;
52
 
 
 
38
    //native allocations
 
39
    std::shared_ptr<hwc_composer_device_1> create_hwc_native_device() const;
 
40
    std::shared_ptr<framebuffer_device_t> create_fb_native_device() const;
 
41
 
 
42
    //devices
 
43
    std::shared_ptr<DisplayDevice> create_fb_device(
 
44
        std::shared_ptr<framebuffer_device_t> const& fb_native_device) const;
 
45
    std::shared_ptr<DisplayDevice> create_hwc11_device(
 
46
        std::shared_ptr<hwc_composer_device_1> const& hwc_native_device) const;
 
47
    std::shared_ptr<DisplayDevice> create_hwc10_device(
 
48
        std::shared_ptr<hwc_composer_device_1> const& hwc_native_device,
 
49
        std::shared_ptr<framebuffer_device_t> const& fb_native_device) const;
 
50
 
 
51
    //fb buffer alloc
 
52
    std::shared_ptr<FBSwapper> create_fb_buffers(
 
53
        std::shared_ptr<DisplayDevice> const& device,
 
54
        std::shared_ptr<GraphicBufferAllocator> const& buffer_allocator) const;
 
55
 
 
56
    //display alloc
53
57
    std::shared_ptr<graphics::Display> create_display(
54
 
        std::shared_ptr<DisplaySupportProvider> const& support_provider,
 
58
        std::shared_ptr<FBSwapper> const& swapper,
 
59
        std::shared_ptr<DisplayDevice> const& device,
55
60
        std::shared_ptr<graphics::DisplayReport> const& report) const;
56
61
 
57
62
private:
58
 
    std::shared_ptr<GraphicBufferAllocator> const buffer_allocator;
59
 
 
60
 
    virtual std::vector<std::shared_ptr<graphics::Buffer>> create_buffers(
61
 
        std::shared_ptr<DisplaySupportProvider> const& info_provider) const;
62
 
 
63
 
    virtual std::shared_ptr<FBSwapper> create_swapper(
 
63
    std::vector<std::shared_ptr<graphics::Buffer>> create_buffers(
 
64
        std::shared_ptr<DisplayDevice> const& device) const;
 
65
    std::shared_ptr<FBSwapper> create_swapper(
64
66
        std::vector<std::shared_ptr<graphics::Buffer>> const& buffers) const;
65
67
};
66
68