blob: 54078fd8fbe2f17d203e1f37bc4bdaf43a3031a8 [file] [log] [blame]
// Copyright 2017 The Fuchsia 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 GARNET_LIB_UI_GFX_RESOURCES_IMAGE_BASE_H_
#define GARNET_LIB_UI_GFX_RESOURCES_IMAGE_BASE_H_
#include "garnet/lib/ui/gfx/engine/session.h"
#include "garnet/lib/ui/gfx/resources/resource.h"
namespace scenic_impl {
namespace gfx {
// Abstract superclass for Image and ImagePipe.
class ImageBase : public Resource {
public:
static const ResourceTypeInfo kTypeInfo;
// Returns the image that should currently be presented. Can be null.
virtual const escher::ImagePtr& GetEscherImage() = 0;
protected:
ImageBase(Session* session, ResourceId id, const ResourceTypeInfo& type_info);
};
using ImageBasePtr = fxl::RefPtr<ImageBase>;
} // namespace gfx
} // namespace scenic_impl
#endif // GARNET_LIB_UI_GFX_RESOURCES_IMAGE_BASE_H_