/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once

#include <memory>
#include <unordered_map>
#include <unordered_set>

#include <EGL/egl.h>
#include <EGL/eglext.h>

#include "Handle.h"

namespace gfxstream {
namespace gl {

class EmulatedEglImage {
  public:
    static std::unique_ptr<EmulatedEglImage> create(EGLDisplay display,
                                                    EGLContext context,
                                                    EGLenum target,
                                                    EGLClientBuffer buffer);

    ~EmulatedEglImage();

    EGLBoolean destroy();

    HandleType getHandle() const { return mHandle; }

  private:
    EmulatedEglImage(HandleType handle,
                     EGLDisplay display,
                     EGLImageKHR image);

    const HandleType mHandle = 0;
    EGLDisplay mEglDisplay = EGL_NO_DISPLAY;
    EGLImageKHR mEglImage = EGL_NO_IMAGE_KHR;
};

typedef std::shared_ptr<EmulatedEglImage> EmulatedEglImagePtr;
typedef std::unordered_map<HandleType, EmulatedEglImagePtr> EmulatedEglImageMap;
typedef std::unordered_set<HandleType> EmulatedEglImageSet;

}  // namespace gl
}  // namespace gfxstream
