@@ -468,22 +468,23 @@ gl::Error BlitGL::blitColorBufferWithShader(const gl::Framebuffer *source,
468468 return gl::NoError ();
469469}
470470
471- gl::ErrorOrResult<bool > BlitGL::copySubTexture (const gl::Context *context,
472- TextureGL *source,
473- size_t sourceLevel,
474- GLenum sourceComponentType,
475- TextureGL *dest,
476- gl::TextureTarget destTarget,
477- size_t destLevel,
478- GLenum destComponentType,
479- const gl::Extents &sourceSize,
480- const gl::Rectangle &sourceArea,
481- const gl::Offset &destOffset,
482- bool needsLumaWorkaround,
483- GLenum lumaFormat,
484- bool unpackFlipY,
485- bool unpackPremultiplyAlpha,
486- bool unpackUnmultiplyAlpha)
471+ gl::Error BlitGL::copySubTexture (const gl::Context *context,
472+ TextureGL *source,
473+ size_t sourceLevel,
474+ GLenum sourceComponentType,
475+ TextureGL *dest,
476+ gl::TextureTarget destTarget,
477+ size_t destLevel,
478+ GLenum destComponentType,
479+ const gl::Extents &sourceSize,
480+ const gl::Rectangle &sourceArea,
481+ const gl::Offset &destOffset,
482+ bool needsLumaWorkaround,
483+ GLenum lumaFormat,
484+ bool unpackFlipY,
485+ bool unpackPremultiplyAlpha,
486+ bool unpackUnmultiplyAlpha,
487+ bool *copySucceededOut)
487488{
488489 ASSERT (source->getType () == gl::TextureType::_2D);
489490 ANGLE_TRY (initializeResources ());
@@ -496,7 +497,8 @@ gl::ErrorOrResult<bool> BlitGL::copySubTexture(const gl::Context *context,
496497 GLenum status = mFunctions ->checkFramebufferStatus (GL_FRAMEBUFFER);
497498 if (status != GL_FRAMEBUFFER_COMPLETE)
498499 {
499- return false ;
500+ *copySucceededOut = false ;
501+ return gl::NoError ();
500502 }
501503
502504 BlitProgramType blitProgramType = getBlitProgramType (sourceComponentType, destComponentType);
@@ -566,7 +568,8 @@ gl::ErrorOrResult<bool> BlitGL::copySubTexture(const gl::Context *context,
566568 mStateManager ->bindVertexArray (mVAO , 0 );
567569 mFunctions ->drawArrays (GL_TRIANGLES, 0 , 3 );
568570
569- return true ;
571+ *copySucceededOut = true ;
572+ return gl::NoError ();
570573}
571574
572575gl::Error BlitGL::copySubTextureCPUReadback (const gl::Context *context,
@@ -653,13 +656,14 @@ gl::Error BlitGL::copySubTextureCPUReadback(const gl::Context *context,
653656 return gl::NoError ();
654657}
655658
656- gl::ErrorOrResult<bool > BlitGL::copyTexSubImage (TextureGL *source,
657- size_t sourceLevel,
658- TextureGL *dest,
659- gl::TextureTarget destTarget,
660- size_t destLevel,
661- const gl::Rectangle &sourceArea,
662- const gl::Offset &destOffset)
659+ gl::Error BlitGL::copyTexSubImage (TextureGL *source,
660+ size_t sourceLevel,
661+ TextureGL *dest,
662+ gl::TextureTarget destTarget,
663+ size_t destLevel,
664+ const gl::Rectangle &sourceArea,
665+ const gl::Offset &destOffset,
666+ bool *copySucceededOut)
663667{
664668 ANGLE_TRY (initializeResources ());
665669
@@ -670,7 +674,8 @@ gl::ErrorOrResult<bool> BlitGL::copyTexSubImage(TextureGL *source,
670674 GLenum status = mFunctions ->checkFramebufferStatus (GL_FRAMEBUFFER);
671675 if (status != GL_FRAMEBUFFER_COMPLETE)
672676 {
673- return false ;
677+ *copySucceededOut = false ;
678+ return gl::NoError ();
674679 }
675680
676681 mStateManager ->bindTexture (dest->getType (), dest->getTextureID ());
@@ -679,13 +684,15 @@ gl::ErrorOrResult<bool> BlitGL::copyTexSubImage(TextureGL *source,
679684 destOffset.y , sourceArea.x , sourceArea.y , sourceArea.width ,
680685 sourceArea.height );
681686
682- return true ;
687+ *copySucceededOut = true ;
688+ return gl::NoError ();
683689}
684690
685- gl::ErrorOrResult<bool > BlitGL::clearRenderableTexture (TextureGL *source,
686- GLenum sizedInternalFormat,
687- int numTextureLayers,
688- const gl::ImageIndex &imageIndex)
691+ gl::Error BlitGL::clearRenderableTexture (TextureGL *source,
692+ GLenum sizedInternalFormat,
693+ int numTextureLayers,
694+ const gl::ImageIndex &imageIndex,
695+ bool *clearSucceededOut)
689696{
690697 ANGLE_TRY (initializeResources ());
691698
@@ -713,7 +720,8 @@ gl::ErrorOrResult<bool> BlitGL::clearRenderableTexture(TextureGL *source,
713720 else
714721 {
715722 UnbindAttachments (mFunctions , GL_FRAMEBUFFER, bindTargets);
716- return false ;
723+ *clearSucceededOut = false ;
724+ return gl::NoError ();
717725 }
718726 }
719727 else
@@ -737,7 +745,8 @@ gl::ErrorOrResult<bool> BlitGL::clearRenderableTexture(TextureGL *source,
737745 else
738746 {
739747 UnbindAttachments (mFunctions , GL_FRAMEBUFFER, bindTargets);
740- return false ;
748+ *clearSucceededOut = false ;
749+ return gl::NoError ();
741750 }
742751 }
743752 else
@@ -767,14 +776,16 @@ gl::ErrorOrResult<bool> BlitGL::clearRenderableTexture(TextureGL *source,
767776 else
768777 {
769778 UnbindAttachments (mFunctions , GL_FRAMEBUFFER, bindTargets);
770- return false ;
779+ *clearSucceededOut = false ;
780+ return gl::NoError ();
771781 }
772782 }
773783 }
774784 }
775785
776786 UnbindAttachments (mFunctions , GL_FRAMEBUFFER, bindTargets);
777- return true ;
787+ *clearSucceededOut = true ;
788+ return gl::NoError ();
778789}
779790
780791gl::Error BlitGL::clearRenderbuffer (RenderbufferGL *source, GLenum sizedInternalFormat)
0 commit comments