Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / angle / src / libGLESv2 / renderer / d3d / d3d11 / PixelTransfer11.h
index ed1a3ae..2955214 100644 (file)
@@ -11,6 +11,8 @@
 #ifndef LIBGLESV2_PIXELTRANSFER11_H_
 #define LIBGLESV2_PIXELTRANSFER11_H_
 
+#include "libGLESv2/Error.h"
+
 #include "common/platform.h"
 
 #include <GLES2/gl2.h>
@@ -38,15 +40,13 @@ class PixelTransfer11
     explicit PixelTransfer11(Renderer11 *renderer);
     ~PixelTransfer11();
 
-    static bool supportsBufferToTextureCopy(GLenum internalFormat);
-
     // unpack: the source buffer is stored in the unpack state, and buffer strides
     // offset: the start of the data within the unpack buffer
     // destRenderTarget: individual slice/layer of a target texture
     // destinationFormat/sourcePixelsType: determines shaders + shader parameters
     // destArea: the sub-section of destRenderTarget to copy to
-    bool copyBufferToTexture(const gl::PixelUnpackState &unpack, unsigned int offset, RenderTarget *destRenderTarget,
-                             GLenum destinationFormat, GLenum sourcePixelsType, const gl::Box &destArea);
+    gl::Error copyBufferToTexture(const gl::PixelUnpackState &unpack, unsigned int offset, RenderTarget *destRenderTarget,
+                                  GLenum destinationFormat, GLenum sourcePixelsType, const gl::Box &destArea);
 
   private:
 
@@ -65,11 +65,13 @@ class PixelTransfer11
     static void setBufferToTextureCopyParams(const gl::Box &destArea, const gl::Extents &destSize, GLenum internalFormat,
                                              const gl::PixelUnpackState &unpack, unsigned int offset, CopyShaderParams *parametersOut);
 
-    void buildShaderMap();
+    gl::Error loadResources();
+    gl::Error buildShaderMap();
     ID3D11PixelShader *findBufferToTexturePS(GLenum internalFormat) const;
 
     Renderer11 *mRenderer;
 
+    bool mResourcesLoaded;
     std::map<GLenum, ID3D11PixelShader *> mBufferToTexturePSMap;
     ID3D11VertexShader *mBufferToTextureVS;
     ID3D11GeometryShader *mBufferToTextureGS;