1f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian/*
2f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian * Copyright (C) 2012 The Android Open Source Project
3f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian *
4f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian * Licensed under the Apache License, Version 2.0 (the "License");
5f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian * you may not use this file except in compliance with the License.
6f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian * You may obtain a copy of the License at
7f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian *
8f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian *      http://www.apache.org/licenses/LICENSE-2.0
9f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian *
10f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian * Unless required by applicable law or agreed to in writing, software
11f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian * distributed under the License is distributed on an "AS IS" BASIS,
12f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian * See the License for the specific language governing permissions and
14f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian * limitations under the License.
15f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian */
16f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian
17f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian#ifndef ANDROID_SF_GRAPHIC_BUFFER_ALLOC_H
18f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian#define ANDROID_SF_GRAPHIC_BUFFER_ALLOC_H
19f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian
20f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian#include <stdint.h>
21f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian#include <sys/types.h>
22f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian
23f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian#include <gui/IGraphicBufferAlloc.h>
24f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian#include <ui/PixelFormat.h>
25f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian#include <utils/Errors.h>
26f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian
27f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopiannamespace android {
28f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian// ---------------------------------------------------------------------------
29f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian
30f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopianclass GraphicBuffer;
31f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian
32f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopianclass GraphicBufferAlloc : public BnGraphicBufferAlloc {
33f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopianpublic:
34f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian    GraphicBufferAlloc();
35f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian    virtual ~GraphicBufferAlloc();
36f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian    virtual sp<GraphicBuffer> createGraphicBuffer(uint32_t w, uint32_t h,
37f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian        PixelFormat format, uint32_t usage, status_t* error);
38f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian};
39f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian
40f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian
41f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian// ---------------------------------------------------------------------------
42f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian}; // namespace android
43f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian
44f33e4b6f13bc3ee2d2a4e1abd1ada171c70d3492Mathias Agopian#endif // ANDROID_SF_GRAPHIC_BUFFER_ALLOC_H
45