Hash :
2dc4639f
Author :
Date :
2015-01-05T14:33:58
Rename SwapChain to SwapChainD3D and move it to the D3D folder. BUG=angle:681 Change-Id: Idcf24556e590e07cc0b6cf640d4701353a0cda5e Reviewed-on: https://chromium-review.googlesource.com/238472 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
//
// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// TextureStorage.h: Defines the abstract rx::TextureStorage class.
#ifndef LIBANGLE_RENDERER_D3D_TEXTURESTORAGE_H_
#define LIBANGLE_RENDERER_D3D_TEXTURESTORAGE_H_
#include "libANGLE/Error.h"
#include "common/debug.h"
#include "libANGLE/Error.h"
#include <GLES2/gl2.h>
#include <stdint.h>
namespace gl
{
struct ImageIndex;
struct Box;
struct PixelUnpackState;
}
namespace rx
{
class SwapChainD3D;
class RenderTargetD3D;
class ImageD3D;
class TextureStorage
{
public:
TextureStorage();
virtual ~TextureStorage() {};
virtual int getTopLevel() const = 0;
virtual bool isRenderTarget() const = 0;
virtual bool isManaged() const = 0;
virtual int getLevelCount() const = 0;
virtual gl::Error getRenderTarget(const gl::ImageIndex &index, RenderTargetD3D **outRT) = 0;
virtual gl::Error generateMipmap(const gl::ImageIndex &sourceIndex, const gl::ImageIndex &destIndex) = 0;
virtual gl::Error copyToStorage(TextureStorage *destStorage) = 0;
virtual gl::Error setData(const gl::ImageIndex &index, ImageD3D *image, const gl::Box *destBox, GLenum type,
const gl::PixelUnpackState &unpack, const uint8_t *pixelData) = 0;
unsigned int getRenderTargetSerial(const gl::ImageIndex &index) const;
unsigned int getTextureSerial() const;
// This is a no-op for most implementations of TextureStorage. Some (e.g. TextureStorage11_2D) might override it.
virtual gl::Error useLevelZeroWorkaroundTexture(bool useLevelZeroTexture) { return gl::Error(GL_NO_ERROR); }
protected:
void initializeSerials(unsigned int rtSerialsToReserve, unsigned int rtSerialsLayerStride);
private:
DISALLOW_COPY_AND_ASSIGN(TextureStorage);
unsigned int mFirstRenderTargetSerial;
unsigned int mRenderTargetSerialsLayerStride;
};
}
#endif // LIBANGLE_RENDERER_D3D_TEXTURESTORAGE_H_