diff options
Diffstat (limited to 'content')
29 files changed, 68 insertions, 67 deletions
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc index 2ef4571..746bc11 100644 --- a/content/common/gpu/gpu_channel.cc +++ b/content/common/gpu/gpu_channel.cc @@ -1033,15 +1033,15 @@ uint64 GpuChannel::GetMemoryUsage() { return size; } -scoped_refptr<gfx::GLImage> GpuChannel::CreateImageForGpuMemoryBuffer( +scoped_refptr<gl::GLImage> GpuChannel::CreateImageForGpuMemoryBuffer( const gfx::GpuMemoryBufferHandle& handle, const gfx::Size& size, gfx::BufferFormat format, uint32 internalformat) { switch (handle.type) { case gfx::SHARED_MEMORY_BUFFER: { - scoped_refptr<gfx::GLImageSharedMemory> image( - new gfx::GLImageSharedMemory(size, internalformat)); + scoped_refptr<gl::GLImageSharedMemory> image( + new gl::GLImageSharedMemory(size, internalformat)); if (!image->Initialize(handle.handle, handle.id, format, handle.offset)) return nullptr; diff --git a/content/common/gpu/gpu_channel.h b/content/common/gpu/gpu_channel.h index 2ca82ee..a47ccf9 100644 --- a/content/common/gpu/gpu_channel.h +++ b/content/common/gpu/gpu_channel.h @@ -148,7 +148,7 @@ class CONTENT_EXPORT GpuChannel uint64 GetMemoryUsage(); - scoped_refptr<gfx::GLImage> CreateImageForGpuMemoryBuffer( + scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer( const gfx::GpuMemoryBufferHandle& handle, const gfx::Size& size, gfx::BufferFormat format, diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc index 0ae8486..b82d715 100644 --- a/content/common/gpu/gpu_command_buffer_stub.cc +++ b/content/common/gpu/gpu_command_buffer_stub.cc @@ -1142,7 +1142,7 @@ void GpuCommandBufferStub::OnCreateImage(int32 id, return; } - scoped_refptr<gfx::GLImage> image = channel()->CreateImageForGpuMemoryBuffer( + scoped_refptr<gl::GLImage> image = channel()->CreateImageForGpuMemoryBuffer( handle, size, format, internalformat); if (!image.get()) return; diff --git a/content/common/gpu/gpu_memory_buffer_factory.h b/content/common/gpu/gpu_memory_buffer_factory.h index 3054075..80f79fc 100644 --- a/content/common/gpu/gpu_memory_buffer_factory.h +++ b/content/common/gpu/gpu_memory_buffer_factory.h @@ -14,10 +14,6 @@ #include "ui/gfx/gpu_memory_buffer.h" #include "ui/gfx/native_widget_types.h" -namespace gfx { -class GLImage; -} - namespace gpu { class ImageFactory; } diff --git a/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc b/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc index b44f714..b9b37f9 100644 --- a/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc +++ b/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc @@ -218,7 +218,7 @@ gpu::ImageFactory* GpuMemoryBufferFactoryIOSurface::AsImageFactory() { return this; } -scoped_refptr<gfx::GLImage> +scoped_refptr<gl::GLImage> GpuMemoryBufferFactoryIOSurface::CreateImageForGpuMemoryBuffer( const gfx::GpuMemoryBufferHandle& handle, const gfx::Size& size, @@ -231,12 +231,12 @@ GpuMemoryBufferFactoryIOSurface::CreateImageForGpuMemoryBuffer( IOSurfaceMapKey key(handle.id, client_id); IOSurfaceMap::iterator it = io_surfaces_.find(key); if (it == io_surfaces_.end()) - return scoped_refptr<gfx::GLImage>(); + return scoped_refptr<gl::GLImage>(); - scoped_refptr<gfx::GLImageIOSurface> image( - new gfx::GLImageIOSurface(size, internalformat)); + scoped_refptr<gl::GLImageIOSurface> image( + new gl::GLImageIOSurface(size, internalformat)); if (!image->Initialize(it->second.get(), handle.id, format)) - return scoped_refptr<gfx::GLImage>(); + return scoped_refptr<gl::GLImage>(); return image; } diff --git a/content/common/gpu/gpu_memory_buffer_factory_io_surface.h b/content/common/gpu/gpu_memory_buffer_factory_io_surface.h index 05db205..825f48a 100644 --- a/content/common/gpu/gpu_memory_buffer_factory_io_surface.h +++ b/content/common/gpu/gpu_memory_buffer_factory_io_surface.h @@ -20,7 +20,7 @@ #include "ui/gfx/geometry/size.h" #include "ui/gfx/gpu_memory_buffer.h" -namespace gfx { +namespace gl { class GLImage; } @@ -58,7 +58,7 @@ class CONTENT_EXPORT GpuMemoryBufferFactoryIOSurface gpu::ImageFactory* AsImageFactory() override; // Overridden from gpu::ImageFactory: - scoped_refptr<gfx::GLImage> CreateImageForGpuMemoryBuffer( + scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer( const gfx::GpuMemoryBufferHandle& handle, const gfx::Size& size, gfx::BufferFormat format, diff --git a/content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.cc b/content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.cc index 0422562..69fdd30 100644 --- a/content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.cc +++ b/content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.cc @@ -108,7 +108,7 @@ gpu::ImageFactory* GpuMemoryBufferFactoryOzoneNativePixmap::AsImageFactory() { return this; } -scoped_refptr<gfx::GLImage> +scoped_refptr<gl::GLImage> GpuMemoryBufferFactoryOzoneNativePixmap::CreateImageForGpuMemoryBuffer( const gfx::GpuMemoryBufferHandle& handle, const gfx::Size& size, diff --git a/content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h b/content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h index e3b53a2a..4ca2b23 100644 --- a/content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h +++ b/content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h @@ -12,7 +12,7 @@ #include "gpu/command_buffer/service/image_factory.h" #include "ui/ozone/public/native_pixmap.h" -namespace gfx { +namespace gl { class GLImage; } @@ -47,7 +47,7 @@ class CONTENT_EXPORT GpuMemoryBufferFactoryOzoneNativePixmap gpu::ImageFactory* AsImageFactory() override; // Overridden from gpu::ImageFactory: - scoped_refptr<gfx::GLImage> CreateImageForGpuMemoryBuffer( + scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer( const gfx::GpuMemoryBufferHandle& handle, const gfx::Size& size, gfx::BufferFormat format, diff --git a/content/common/gpu/gpu_memory_buffer_factory_surface_texture.cc b/content/common/gpu/gpu_memory_buffer_factory_surface_texture.cc index 9fb631d..a9913c8 100644 --- a/content/common/gpu/gpu_memory_buffer_factory_surface_texture.cc +++ b/content/common/gpu/gpu_memory_buffer_factory_surface_texture.cc @@ -97,7 +97,7 @@ gpu::ImageFactory* GpuMemoryBufferFactorySurfaceTexture::AsImageFactory() { return this; } -scoped_refptr<gfx::GLImage> +scoped_refptr<gl::GLImage> GpuMemoryBufferFactorySurfaceTexture::CreateImageForGpuMemoryBuffer( const gfx::GpuMemoryBufferHandle& handle, const gfx::Size& size, @@ -111,12 +111,12 @@ GpuMemoryBufferFactorySurfaceTexture::CreateImageForGpuMemoryBuffer( SurfaceTextureMapKey key(handle.id.id, client_id); SurfaceTextureMap::iterator it = surface_textures_.find(key); if (it == surface_textures_.end()) - return scoped_refptr<gfx::GLImage>(); + return scoped_refptr<gl::GLImage>(); - scoped_refptr<gfx::GLImageSurfaceTexture> image( - new gfx::GLImageSurfaceTexture(size)); + scoped_refptr<gl::GLImageSurfaceTexture> image( + new gl::GLImageSurfaceTexture(size)); if (!image->Initialize(it->second.get())) - return scoped_refptr<gfx::GLImage>(); + return scoped_refptr<gl::GLImage>(); return image; } diff --git a/content/common/gpu/gpu_memory_buffer_factory_surface_texture.h b/content/common/gpu/gpu_memory_buffer_factory_surface_texture.h index 1696df3..b9eda55 100644 --- a/content/common/gpu/gpu_memory_buffer_factory_surface_texture.h +++ b/content/common/gpu/gpu_memory_buffer_factory_surface_texture.h @@ -17,10 +17,13 @@ #include "ui/gfx/gpu_memory_buffer.h" namespace gfx { -class GLImage; class SurfaceTexture; } +namespace gl { +class GLImage; +} + namespace content { class CONTENT_EXPORT GpuMemoryBufferFactorySurfaceTexture @@ -52,7 +55,7 @@ class CONTENT_EXPORT GpuMemoryBufferFactorySurfaceTexture gpu::ImageFactory* AsImageFactory() override; // Overridden from gpu::ImageFactory: - scoped_refptr<gfx::GLImage> CreateImageForGpuMemoryBuffer( + scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer( const gfx::GpuMemoryBufferHandle& handle, const gfx::Size& size, gfx::BufferFormat format, diff --git a/content/common/gpu/image_transport_surface_overlay_mac.h b/content/common/gpu/image_transport_surface_overlay_mac.h index c4140f31..9da4adf 100644 --- a/content/common/gpu/image_transport_surface_overlay_mac.h +++ b/content/common/gpu/image_transport_surface_overlay_mac.h @@ -42,7 +42,7 @@ class ImageTransportSurfaceOverlayMac : public gfx::GLSurface, bool SetBackbufferAllocation(bool allocated) override; bool ScheduleOverlayPlane(int z_order, gfx::OverlayTransform transform, - gfx::GLImage* image, + gl::GLImage* image, const gfx::Rect& bounds_rect, const gfx::RectF& crop_rect) override; bool IsSurfaceless() const override; diff --git a/content/common/gpu/image_transport_surface_overlay_mac.mm b/content/common/gpu/image_transport_surface_overlay_mac.mm index 81dcf54..770c482 100644 --- a/content/common/gpu/image_transport_surface_overlay_mac.mm +++ b/content/common/gpu/image_transport_surface_overlay_mac.mm @@ -661,7 +661,7 @@ bool ImageTransportSurfaceOverlayMac::SetBackbufferAllocation(bool allocated) { bool ImageTransportSurfaceOverlayMac::ScheduleOverlayPlane( int z_order, gfx::OverlayTransform transform, - gfx::GLImage* image, + gl::GLImage* image, const gfx::Rect& bounds_rect, const gfx::RectF& crop_rect) { DCHECK_EQ(transform, gfx::OVERLAY_TRANSFORM_NONE); @@ -669,8 +669,8 @@ bool ImageTransportSurfaceOverlayMac::ScheduleOverlayPlane( return false; linked_ptr<OverlayPlane> plane(new OverlayPlane( - z_order, static_cast<gfx::GLImageIOSurface*>(image)->io_surface_id().id, - static_cast<gfx::GLImageIOSurface*>(image)->io_surface(), + z_order, static_cast<gl::GLImageIOSurface*>(image)->io_surface_id().id, + static_cast<gl::GLImageIOSurface*>(image)->io_surface(), ConvertRectToDIPF(scale_factor_, bounds_rect), crop_rect)); if (z_order == 0) pending_root_plane_ = plane; diff --git a/content/common/gpu/media/android_deferred_rendering_backing_strategy.cc b/content/common/gpu/media/android_deferred_rendering_backing_strategy.cc index db83791..fd74134 100644 --- a/content/common/gpu/media/android_deferred_rendering_backing_strategy.cc +++ b/content/common/gpu/media/android_deferred_rendering_backing_strategy.cc @@ -84,14 +84,14 @@ AVDACodecImage* AndroidDeferredRenderingBackingStrategy::GetImageForPicture( const media::PictureBuffer& picture_buffer) { gpu::gles2::TextureRef* texture_ref = GetTextureForPicture(picture_buffer); RETURN_NULL_IF_NULL(texture_ref); - gfx::GLImage* image = + gl::GLImage* image = texture_ref->texture()->GetLevelImage(GetTextureTarget(), 0); return static_cast<AVDACodecImage*>(image); } void AndroidDeferredRenderingBackingStrategy::SetImageForPicture( const media::PictureBuffer& picture_buffer, - const scoped_refptr<gfx::GLImage>& image) { + const scoped_refptr<gl::GLImage>& image) { gpu::gles2::TextureRef* texture_ref = GetTextureForPicture(picture_buffer); RETURN_IF_NULL(texture_ref); @@ -134,7 +134,7 @@ void AndroidDeferredRenderingBackingStrategy::AssignOnePictureBuffer( const media::PictureBuffer& picture_buffer) { // Attach a GLImage to each texture that will use the surface texture. // We use a refptr here in case SetImageForPicture fails. - scoped_refptr<gfx::GLImage> gl_image( + scoped_refptr<gl::GLImage> gl_image( new AVDACodecImage(shared_state_, media_codec_, state_provider_->GetGlDecoder(), surface_texture_)); SetImageForPicture(picture_buffer, gl_image); diff --git a/content/common/gpu/media/android_deferred_rendering_backing_strategy.h b/content/common/gpu/media/android_deferred_rendering_backing_strategy.h index 3439a6f..7fb8d2b 100644 --- a/content/common/gpu/media/android_deferred_rendering_backing_strategy.h +++ b/content/common/gpu/media/android_deferred_rendering_backing_strategy.h @@ -8,7 +8,7 @@ #include "content/common/content_export.h" #include "content/common/gpu/media/android_video_decode_accelerator.h" -namespace gfx { +namespace gl { class GLImage; } @@ -59,7 +59,7 @@ class CONTENT_EXPORT AndroidDeferredRenderingBackingStrategy // Return the AVDACodecImage for a given PictureBuffer's texture. AVDACodecImage* GetImageForPicture(const media::PictureBuffer&); void SetImageForPicture(const media::PictureBuffer& picture_buffer, - const scoped_refptr<gfx::GLImage>& image); + const scoped_refptr<gl::GLImage>& image); scoped_refptr<AVDASharedState> shared_state_; diff --git a/content/common/gpu/media/avda_codec_image.h b/content/common/gpu/media/avda_codec_image.h index 0ced55c..cba3416 100644 --- a/content/common/gpu/media/avda_codec_image.h +++ b/content/common/gpu/media/avda_codec_image.h @@ -12,7 +12,7 @@ namespace content { // GLImage that renders MediaCodec buffers to a SurfaceTexture as needed // in order to draw them. -class AVDACodecImage : public gfx::GLImage { +class AVDACodecImage : public gl::GLImage { public: AVDACodecImage(const scoped_refptr<AVDASharedState>&, media::VideoCodecBridge* codec, @@ -23,7 +23,7 @@ class AVDACodecImage : public gfx::GLImage { ~AVDACodecImage() override; public: - // gfx::GLImage implementation + // gl::GLImage implementation void Destroy(bool have_context) override; gfx::Size GetSize() override; unsigned GetInternalFormat() override; diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc index 9b6e1d7..302caea 100644 --- a/content/common/gpu/media/gpu_video_decode_accelerator.cc +++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc @@ -336,7 +336,7 @@ GpuVideoDecodeAccelerator::CreateV4L2SliceVDA() { void GpuVideoDecodeAccelerator::BindImage(uint32 client_texture_id, uint32 texture_target, - scoped_refptr<gfx::GLImage> image) { + scoped_refptr<gl::GLImage> image) { gpu::gles2::GLES2Decoder* command_decoder = stub_->decoder(); gpu::gles2::TextureManager* texture_manager = command_decoder->GetContextGroup()->texture_manager(); diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.h b/content/common/gpu/media/gpu_video_decode_accelerator.h index e4c85b1..2b2c3b7 100644 --- a/content/common/gpu/media/gpu_video_decode_accelerator.h +++ b/content/common/gpu/media/gpu_video_decode_accelerator.h @@ -108,7 +108,7 @@ class GpuVideoDecodeAccelerator // Helper to bind |image| to the texture specified by |client_texture_id|. void BindImage(uint32 client_texture_id, uint32 texture_target, - scoped_refptr<gfx::GLImage> image); + scoped_refptr<gl::GLImage> image); // Route ID to communicate with the host. const int32 host_route_id_; diff --git a/content/common/gpu/media/vaapi_drm_picture.cc b/content/common/gpu/media/vaapi_drm_picture.cc index 6d16a0f..55d01d4 100644 --- a/content/common/gpu/media/vaapi_drm_picture.cc +++ b/content/common/gpu/media/vaapi_drm_picture.cc @@ -191,7 +191,7 @@ scoped_refptr<ui::NativePixmap> VaapiDrmPicture::ScalePixmap( return scaled_pixmap_; } -scoped_refptr<gfx::GLImage> VaapiDrmPicture::GetImageToBind() { +scoped_refptr<gl::GLImage> VaapiDrmPicture::GetImageToBind() { return gl_image_; } diff --git a/content/common/gpu/media/vaapi_drm_picture.h b/content/common/gpu/media/vaapi_drm_picture.h index 4a0b83b..4ea787f 100644 --- a/content/common/gpu/media/vaapi_drm_picture.h +++ b/content/common/gpu/media/vaapi_drm_picture.h @@ -15,7 +15,7 @@ #include "content/common/gpu/media/vaapi_picture.h" #include "ui/gfx/geometry/size.h" -namespace gfx { +namespace gl { class GLImage; } @@ -42,7 +42,7 @@ class VaapiDrmPicture : public VaapiPicture { bool DownloadFromSurface(const scoped_refptr<VASurface>& va_surface) override; - scoped_refptr<gfx::GLImage> GetImageToBind() override; + scoped_refptr<gl::GLImage> GetImageToBind() override; bool AllowOverlay() const override; @@ -69,7 +69,7 @@ class VaapiDrmPicture : public VaapiPicture { scoped_refptr<ui::NativePixmap> scaled_pixmap_; // EGLImage bound to the GL textures used by the VDA client. - scoped_refptr<gfx::GLImage> gl_image_; + scoped_refptr<gl::GLImage> gl_image_; // VASurface used to transfer from the decoder's pixel format. scoped_refptr<VASurface> va_surface_; diff --git a/content/common/gpu/media/vaapi_picture.h b/content/common/gpu/media/vaapi_picture.h index ad43dfa..c1fb4c5b 100644 --- a/content/common/gpu/media/vaapi_picture.h +++ b/content/common/gpu/media/vaapi_picture.h @@ -16,7 +16,7 @@ #include "base/threading/non_thread_safe.h" #include "ui/gfx/geometry/size.h" -namespace gfx { +namespace gl { class GLImage; } @@ -40,7 +40,7 @@ class VaapiPicture : public base::NonThreadSafe { virtual bool AllowOverlay() const; // Returns the |GLImage|, if any, to bind to the texture. - virtual scoped_refptr<gfx::GLImage> GetImageToBind() = 0; + virtual scoped_refptr<gl::GLImage> GetImageToBind() = 0; // Downloads the |va_surface| into the picture, potentially scaling // it if needed. diff --git a/content/common/gpu/media/vaapi_tfp_picture.cc b/content/common/gpu/media/vaapi_tfp_picture.cc index ee03742..7dbd139 100644 --- a/content/common/gpu/media/vaapi_tfp_picture.cc +++ b/content/common/gpu/media/vaapi_tfp_picture.cc @@ -52,7 +52,7 @@ bool VaapiTFPPicture::Initialize() { return false; } - glx_image_ = new gfx::GLImageGLX(size(), GL_RGB); + glx_image_ = new gl::GLImageGLX(size(), GL_RGB); if (!glx_image_->Initialize(x_pixmap_)) { // x_pixmap_ will be freed in the destructor. LOG(ERROR) << "Failed creating a GLX Pixmap for TFP"; @@ -74,7 +74,7 @@ bool VaapiTFPPicture::DownloadFromSurface( va_surface->size()); } -scoped_refptr<gfx::GLImage> VaapiTFPPicture::GetImageToBind() { +scoped_refptr<gl::GLImage> VaapiTFPPicture::GetImageToBind() { return nullptr; } diff --git a/content/common/gpu/media/vaapi_tfp_picture.h b/content/common/gpu/media/vaapi_tfp_picture.h index 3261791..fdc2c64 100644 --- a/content/common/gpu/media/vaapi_tfp_picture.h +++ b/content/common/gpu/media/vaapi_tfp_picture.h @@ -16,10 +16,13 @@ #include "ui/gl/gl_bindings.h" namespace gfx { -class GLImageGLX; class GLContextGLX; } +namespace gl { +class GLImageGLX; +} + namespace content { class VaapiWrapper; @@ -39,7 +42,7 @@ class VaapiTFPPicture : public VaapiPicture { bool DownloadFromSurface(const scoped_refptr<VASurface>& va_surface) override; - scoped_refptr<gfx::GLImage> GetImageToBind() override; + scoped_refptr<gl::GLImage> GetImageToBind() override; private: VaapiWrapper* vaapi_wrapper_; // Not owned. @@ -48,7 +51,7 @@ class VaapiTFPPicture : public VaapiPicture { Display* x_display_; Pixmap x_pixmap_; - scoped_refptr<gfx::GLImageGLX> glx_image_; + scoped_refptr<gl::GLImageGLX> glx_image_; DISALLOW_COPY_AND_ASSIGN(VaapiTFPPicture); }; diff --git a/content/common/gpu/media/vaapi_video_decode_accelerator.cc b/content/common/gpu/media/vaapi_video_decode_accelerator.cc index b0ecbd0..d5b70aa 100644 --- a/content/common/gpu/media/vaapi_video_decode_accelerator.cc +++ b/content/common/gpu/media/vaapi_video_decode_accelerator.cc @@ -291,7 +291,7 @@ VaapiPicture* VaapiVideoDecodeAccelerator::PictureById( VaapiVideoDecodeAccelerator::VaapiVideoDecodeAccelerator( const base::Callback<bool(void)>& make_context_current, - const base::Callback<void(uint32, uint32, scoped_refptr<gfx::GLImage>)>& + const base::Callback<void(uint32, uint32, scoped_refptr<gl::GLImage>)>& bind_image) : make_context_current_(make_context_current), state_(kUninitialized), @@ -732,7 +732,7 @@ void VaapiVideoDecodeAccelerator::AssignPictureBuffers( vaapi_wrapper_.get(), make_context_current_, buffers[i].id(), buffers[i].texture_id(), requested_pic_size_)); - scoped_refptr<gfx::GLImage> image = picture->GetImageToBind(); + scoped_refptr<gl::GLImage> image = picture->GetImageToBind(); if (image) { bind_image_.Run(buffers[i].internal_texture_id(), VaapiPicture::GetGLTextureTarget(), image); diff --git a/content/common/gpu/media/vaapi_video_decode_accelerator.h b/content/common/gpu/media/vaapi_video_decode_accelerator.h index fe92938..ac9f4be 100644 --- a/content/common/gpu/media/vaapi_video_decode_accelerator.h +++ b/content/common/gpu/media/vaapi_video_decode_accelerator.h @@ -28,7 +28,7 @@ #include "media/video/picture.h" #include "media/video/video_decode_accelerator.h" -namespace gfx { +namespace gl { class GLImage; } @@ -52,7 +52,7 @@ class CONTENT_EXPORT VaapiVideoDecodeAccelerator VaapiVideoDecodeAccelerator( const base::Callback<bool(void)>& make_context_current, - const base::Callback<void(uint32, uint32, scoped_refptr<gfx::GLImage>)>& + const base::Callback<void(uint32, uint32, scoped_refptr<gl::GLImage>)>& bind_image); ~VaapiVideoDecodeAccelerator() override; @@ -303,7 +303,7 @@ class CONTENT_EXPORT VaapiVideoDecodeAccelerator // Binds the provided GLImage to a givenr client texture ID & texture target // combination in GLES. - base::Callback<void(uint32, uint32, scoped_refptr<gfx::GLImage>)> bind_image_; + base::Callback<void(uint32, uint32, scoped_refptr<gl::GLImage>)> bind_image_; // The WeakPtrFactory for |weak_this_|. base::WeakPtrFactory<VaapiVideoDecodeAccelerator> weak_this_factory_; diff --git a/content/common/gpu/media/video_decode_accelerator_unittest.cc b/content/common/gpu/media/video_decode_accelerator_unittest.cc index 493ced7..9a8b774 100644 --- a/content/common/gpu/media/video_decode_accelerator_unittest.cc +++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc @@ -367,7 +367,7 @@ class GLRenderingVDAClient void BindImage(uint32 client_texture_id, uint32 texture_target, - scoped_refptr<gfx::GLImage> image); + scoped_refptr<gl::GLImage> image); void SetState(ClientState new_state); void FinishInitialization(); @@ -576,8 +576,7 @@ GLRenderingVDAClient::CreateVaapiVDA() { void GLRenderingVDAClient::BindImage(uint32 client_texture_id, uint32 texture_target, - scoped_refptr<gfx::GLImage> image) { -} + scoped_refptr<gl::GLImage> image) {} void GLRenderingVDAClient::CreateAndStartDecoder() { LOG_ASSERT(decoder_deleted()); diff --git a/content/common/gpu/media/vt_video_decode_accelerator.cc b/content/common/gpu/media/vt_video_decode_accelerator.cc index 076c9dc..2947fe1 100644 --- a/content/common/gpu/media/vt_video_decode_accelerator.cc +++ b/content/common/gpu/media/vt_video_decode_accelerator.cc @@ -300,7 +300,7 @@ bool VTVideoDecodeAccelerator::FrameOrder::operator()( VTVideoDecodeAccelerator::VTVideoDecodeAccelerator( const base::Callback<bool(void)>& make_context_current, - const base::Callback<void(uint32, uint32, scoped_refptr<gfx::GLImage>)>& + const base::Callback<void(uint32, uint32, scoped_refptr<gl::GLImage>)>& bind_image) : make_context_current_(make_context_current), bind_image_(bind_image), @@ -1044,8 +1044,8 @@ bool VTVideoDecodeAccelerator::SendFrame(const Frame& frame) { } bool allow_overlay = false; - scoped_refptr<gfx::GLImageIOSurface> gl_image( - new gfx::GLImageIOSurface(frame.coded_size, GL_BGRA_EXT)); + scoped_refptr<gl::GLImageIOSurface> gl_image( + new gl::GLImageIOSurface(frame.coded_size, GL_BGRA_EXT)); if (gl_image->Initialize(surface, gfx::GenericSharedMemoryId(), gfx::BufferFormat::BGRA_8888)) { allow_overlay = true; diff --git a/content/common/gpu/media/vt_video_decode_accelerator.h b/content/common/gpu/media/vt_video_decode_accelerator.h index 0a38509..c728968 100644 --- a/content/common/gpu/media/vt_video_decode_accelerator.h +++ b/content/common/gpu/media/vt_video_decode_accelerator.h @@ -36,7 +36,7 @@ class VTVideoDecodeAccelerator : public media::VideoDecodeAccelerator { public: explicit VTVideoDecodeAccelerator( const base::Callback<bool(void)>& make_context_current, - const base::Callback<void(uint32, uint32, scoped_refptr<gfx::GLImage>)>& + const base::Callback<void(uint32, uint32, scoped_refptr<gl::GLImage>)>& bind_image); ~VTVideoDecodeAccelerator() override; @@ -127,7 +127,7 @@ class VTVideoDecodeAccelerator : public media::VideoDecodeAccelerator { // The GLImage representation of |cv_image|. This is kept around to ensure // that Destroy is called on it before it hits its destructor (there is a // DCHECK that requires this). - scoped_refptr<gfx::GLImageIOSurface> gl_image; + scoped_refptr<gl::GLImageIOSurface> gl_image; // Texture IDs for the image buffer. const uint32_t client_texture_id; @@ -187,7 +187,7 @@ class VTVideoDecodeAccelerator : public media::VideoDecodeAccelerator { // GPU thread state. // base::Callback<bool(void)> make_context_current_; - base::Callback<void(uint32, uint32, scoped_refptr<gfx::GLImage>)> bind_image_; + base::Callback<void(uint32, uint32, scoped_refptr<gl::GLImage>)> bind_image_; media::VideoDecodeAccelerator::Client* client_; State state_; diff --git a/content/common/gpu/stream_texture_android.cc b/content/common/gpu/stream_texture_android.cc index daac127..84a0d1f 100644 --- a/content/common/gpu/stream_texture_android.cc +++ b/content/common/gpu/stream_texture_android.cc @@ -38,7 +38,7 @@ bool StreamTexture::Create( // TODO: Ideally a valid image id was returned to the client so that // it could then call glBindTexImage2D() for doing the following. - scoped_refptr<gfx::GLImage> gl_image( + scoped_refptr<gl::GLImage> gl_image( new StreamTexture(owner_stub, stream_id, texture->service_id())); gfx::Size size = gl_image->GetSize(); texture_manager->SetTarget(texture, GL_TEXTURE_EXTERNAL_OES); diff --git a/content/common/gpu/stream_texture_android.h b/content/common/gpu/stream_texture_android.h index 94a0848..a761206 100644 --- a/content/common/gpu/stream_texture_android.h +++ b/content/common/gpu/stream_texture_android.h @@ -18,7 +18,7 @@ class Size; namespace content { -class StreamTexture : public gfx::GLImage, +class StreamTexture : public gl::GLImage, public IPC::Listener, public GpuCommandBufferStub::DestructionObserver { public: @@ -32,7 +32,7 @@ class StreamTexture : public gfx::GLImage, uint32 texture_id); ~StreamTexture() override; - // gfx::GLImage implementation: + // gl::GLImage implementation: void Destroy(bool have_context) override; gfx::Size GetSize() override; unsigned GetInternalFormat() override; |