diff options
Diffstat (limited to 'gpu/command_buffer')
13 files changed, 73 insertions, 74 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 0ecf45b..6095b84 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -1896,7 +1896,7 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient { // Copies the image to the texture currently bound to |textarget|. The image // state of |texture| is updated to reflect the new state. - void DoCopyTexImage(Texture* texture, GLenum textarget, gfx::GLImage* image); + void DoCopyTexImage(Texture* texture, GLenum textarget, gl::GLImage* image); // This will call DoCopyTexImage if texture has an image but that image is // not bound or copied to the texture. @@ -7532,7 +7532,7 @@ void GLES2DecoderImpl::PerformanceWarning( void GLES2DecoderImpl::DoCopyTexImage(Texture* texture, GLenum textarget, - gfx::GLImage* image) { + gl::GLImage* image) { // Note: We update the state to COPIED prior to calling CopyTexImage() // as that allows the GLImage implemenatation to set it back to UNBOUND // and ensure that CopyTexImage() is called each time the texture is @@ -7547,7 +7547,7 @@ void GLES2DecoderImpl::DoCopyTexImageIfNeeded(Texture* texture, // Image is already in use if texture is attached to a framebuffer. if (texture && !texture->IsAttachedToFramebuffer()) { Texture::ImageState image_state; - gfx::GLImage* image = texture->GetLevelImage(textarget, 0, &image_state); + gl::GLImage* image = texture->GetLevelImage(textarget, 0, &image_state); if (image && image_state == Texture::UNBOUND) { ScopedGLErrorSuppressor suppressor( "GLES2DecoderImpl::DoCopyTexImageIfNeeded", GetErrorState()); @@ -7601,7 +7601,7 @@ bool GLES2DecoderImpl::PrepareTexturesForRender() { if (textarget != GL_TEXTURE_CUBE_MAP) { Texture* texture = texture_ref->texture(); Texture::ImageState image_state; - gfx::GLImage* image = + gl::GLImage* image = texture->GetLevelImage(textarget, 0, &image_state); if (image && image_state == Texture::UNBOUND && !texture->IsAttachedToFramebuffer()) { @@ -9366,7 +9366,7 @@ error::Error GLES2DecoderImpl::HandleScheduleOverlayPlaneCHROMIUM( return error::kNoError; } Texture::ImageState image_state; - gfx::GLImage* image = + gl::GLImage* image = ref->texture()->GetLevelImage(ref->texture()->target(), 0, &image_state); if (!image || image_state != Texture::BOUND) { LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, @@ -12854,7 +12854,7 @@ void GLES2DecoderImpl::DoCopyTextureCHROMIUM( Texture* dest_texture = dest_texture_ref->texture(); int source_width = 0; int source_height = 0; - gfx::GLImage* image = + gl::GLImage* image = source_texture->GetLevelImage(source_texture->target(), 0); if (image) { gfx::Size size = image->GetSize(); @@ -13012,7 +13012,7 @@ void GLES2DecoderImpl::DoCopySubTextureCHROMIUM( Texture* dest_texture = dest_texture_ref->texture(); int source_width = 0; int source_height = 0; - gfx::GLImage* image = + gl::GLImage* image = source_texture->GetLevelImage(source_texture->target(), 0); if (image) { gfx::Size size = image->GetSize(); @@ -13158,7 +13158,7 @@ void GLES2DecoderImpl::DoCompressedCopyTextureCHROMIUM(GLenum target, Texture* dest_texture = dest_texture_ref->texture(); int source_width = 0; int source_height = 0; - gfx::GLImage* image = + gl::GLImage* image = source_texture->GetLevelImage(source_texture->target(), 0); if (image) { gfx::Size size = image->GetSize(); @@ -13334,7 +13334,7 @@ void GLES2DecoderImpl::DoCompressedCopySubTextureCHROMIUM(GLenum target, Texture* dest_texture = dest_texture_ref->texture(); int source_width = 0; int source_height = 0; - gfx::GLImage* image = + gl::GLImage* image = source_texture->GetLevelImage(source_texture->target(), 0); if (image) { gfx::Size size = image->GetSize(); @@ -13939,7 +13939,7 @@ void GLES2DecoderImpl::DoBindTexImage2DCHROMIUM( return; } - gfx::GLImage* image = image_manager()->LookupImage(image_id); + gl::GLImage* image = image_manager()->LookupImage(image_id); if (!image) { LOCAL_SET_GL_ERROR( GL_INVALID_OPERATION, @@ -13982,7 +13982,7 @@ void GLES2DecoderImpl::DoReleaseTexImage2DCHROMIUM( return; } - gfx::GLImage* image = image_manager()->LookupImage(image_id); + gl::GLImage* image = image_manager()->LookupImage(image_id); if (!image) { LOCAL_SET_GL_ERROR( GL_INVALID_OPERATION, diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc index 37d377d..7c7cf7c 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc @@ -2611,7 +2611,7 @@ TEST_P(GLES2DecoderTest, BindTexImage2DCHROMIUM) { Texture* texture = texture_ref->texture(); EXPECT_EQ(kServiceTextureId, texture->service_id()); - scoped_refptr<gfx::GLImage> image(new gfx::GLImageStub); + scoped_refptr<gl::GLImage> image(new gl::GLImageStub); GetImageManager()->AddImage(image.get(), 1); EXPECT_FALSE(GetImageManager()->LookupImage(1) == NULL); @@ -2647,7 +2647,7 @@ TEST_P(GLES2DecoderTest, BindTexImage2DCHROMIUM) { } TEST_P(GLES2DecoderTest, BindTexImage2DCHROMIUMCubeMapNotAllowed) { - scoped_refptr<gfx::GLImage> image(new gfx::GLImageStub); + scoped_refptr<gl::GLImage> image(new gl::GLImageStub); GetImageManager()->AddImage(image.get(), 1); DoBindTexture(GL_TEXTURE_CUBE_MAP, client_texture_id_, kServiceTextureId); @@ -2658,7 +2658,7 @@ TEST_P(GLES2DecoderTest, BindTexImage2DCHROMIUMCubeMapNotAllowed) { } TEST_P(GLES2DecoderTest, OrphanGLImageWithTexImage2D) { - scoped_refptr<gfx::GLImage> image(new gfx::GLImageStub); + scoped_refptr<gl::GLImage> image(new gl::GLImageStub); GetImageManager()->AddImage(image.get(), 1); DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); @@ -2681,7 +2681,7 @@ TEST_P(GLES2DecoderTest, GLImageAttachedAfterSubTexImage2D) { ASSERT_FALSE( feature_info()->workarounds().texsubimage_faster_than_teximage); - scoped_refptr<gfx::GLImage> image(new gfx::GLImageStub); + scoped_refptr<gl::GLImage> image(new gl::GLImageStub); GetImageManager()->AddImage(image.get(), 1); DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); @@ -2726,7 +2726,7 @@ TEST_P(GLES2DecoderTest, GLImageAttachedAfterSubTexImage2D) { } TEST_P(GLES2DecoderTest, GLImageAttachedAfterClearLevel) { - scoped_refptr<gfx::GLImage> image(new gfx::GLImageStub); + scoped_refptr<gl::GLImage> image(new gl::GLImageStub); GetImageManager()->AddImage(image.get(), 1); DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); @@ -2779,7 +2779,7 @@ TEST_P(GLES2DecoderTest, ReleaseTexImage2DCHROMIUM) { Texture* texture = texture_ref->texture(); EXPECT_EQ(kServiceTextureId, texture->service_id()); - scoped_refptr<gfx::GLImage> image(new gfx::GLImageStub); + scoped_refptr<gl::GLImage> image(new gl::GLImageStub); GetImageManager()->AddImage(image.get(), 1); EXPECT_FALSE(GetImageManager()->LookupImage(1) == NULL); @@ -2820,11 +2820,11 @@ TEST_P(GLES2DecoderTest, ReleaseTexImage2DCHROMIUM) { EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_2D, 0) == NULL); } -class MockGLImage : public gfx::GLImage { +class MockGLImage : public gl::GLImage { public: MockGLImage() {} - // Overridden from gfx::GLImage: + // Overridden from gl::GLImage: MOCK_METHOD0(GetSize, gfx::Size()); MOCK_METHOD0(GetInternalFormat, unsigned()); MOCK_METHOD1(Destroy, void(bool)); diff --git a/gpu/command_buffer/service/image_factory.h b/gpu/command_buffer/service/image_factory.h index 3746d56..c27c245 100644 --- a/gpu/command_buffer/service/image_factory.h +++ b/gpu/command_buffer/service/image_factory.h @@ -10,7 +10,7 @@ #include "ui/gfx/geometry/size.h" #include "ui/gfx/gpu_memory_buffer.h" -namespace gfx { +namespace gl { class GLImage; } @@ -44,7 +44,7 @@ class GPU_EXPORT ImageFactory { // Creates a GLImage instance for GPU memory buffer identified by |handle|. // |client_id| should be set to the client requesting the creation of instance // and can be used by factory implementation to verify access rights. - virtual scoped_refptr<gfx::GLImage> CreateImageForGpuMemoryBuffer( + virtual scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer( const gfx::GpuMemoryBufferHandle& handle, const gfx::Size& size, gfx::BufferFormat format, diff --git a/gpu/command_buffer/service/image_manager.cc b/gpu/command_buffer/service/image_manager.cc index 46438c7..7464734 100644 --- a/gpu/command_buffer/service/image_manager.cc +++ b/gpu/command_buffer/service/image_manager.cc @@ -23,7 +23,7 @@ void ImageManager::Destroy(bool have_context) { images_.clear(); } -void ImageManager::AddImage(gfx::GLImage* image, int32 service_id) { +void ImageManager::AddImage(gl::GLImage* image, int32 service_id) { DCHECK(images_.find(service_id) == images_.end()); images_[service_id] = image; } @@ -35,7 +35,7 @@ void ImageManager::RemoveImage(int32 service_id) { images_.erase(iter); } -gfx::GLImage* ImageManager::LookupImage(int32 service_id) { +gl::GLImage* ImageManager::LookupImage(int32 service_id) { GLImageMap::const_iterator iter = images_.find(service_id); if (iter != images_.end()) return iter->second.get(); diff --git a/gpu/command_buffer/service/image_manager.h b/gpu/command_buffer/service/image_manager.h index 0a440f9e..8ec1e3f 100644 --- a/gpu/command_buffer/service/image_manager.h +++ b/gpu/command_buffer/service/image_manager.h @@ -10,7 +10,7 @@ #include "base/memory/ref_counted.h" #include "gpu/gpu_export.h" -namespace gfx { +namespace gl { class GLImage; } @@ -24,12 +24,12 @@ class GPU_EXPORT ImageManager { ~ImageManager(); void Destroy(bool have_context); - void AddImage(gfx::GLImage* image, int32 service_id); + void AddImage(gl::GLImage* image, int32 service_id); void RemoveImage(int32 service_id); - gfx::GLImage* LookupImage(int32 service_id); + gl::GLImage* LookupImage(int32 service_id); private: - typedef base::hash_map<int32, scoped_refptr<gfx::GLImage> > GLImageMap; + typedef base::hash_map<int32, scoped_refptr<gl::GLImage>> GLImageMap; GLImageMap images_; DISALLOW_COPY_AND_ASSIGN(ImageManager); diff --git a/gpu/command_buffer/service/in_process_command_buffer.cc b/gpu/command_buffer/service/in_process_command_buffer.cc index 77647ef..3b5f9d0 100644 --- a/gpu/command_buffer/service/in_process_command_buffer.cc +++ b/gpu/command_buffer/service/in_process_command_buffer.cc @@ -712,8 +712,8 @@ void InProcessCommandBuffer::CreateImageOnGpuThread( 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)) { LOG(ERROR) << "Failed to initialize image."; return; @@ -731,7 +731,7 @@ void InProcessCommandBuffer::CreateImageOnGpuThread( // Note: this assumes that client ID is always 0. const int kClientId = 0; - scoped_refptr<gfx::GLImage> image = + scoped_refptr<gl::GLImage> image = image_factory_->CreateImageForGpuMemoryBuffer( handle, size, format, internalformat, kClientId); if (!image.get()) { diff --git a/gpu/command_buffer/service/mailbox_manager_sync.cc b/gpu/command_buffer/service/mailbox_manager_sync.cc index 94aa1d7..8391450 100644 --- a/gpu/command_buffer/service/mailbox_manager_sync.cc +++ b/gpu/command_buffer/service/mailbox_manager_sync.cc @@ -273,7 +273,7 @@ void MailboxManagerSync::UpdateDefinitionLocked( if (SkipTextureWorkarounds(texture)) return; - gfx::GLImage* image = texture->GetLevelImage(texture->target(), 0); + gl::GLImage* image = texture->GetLevelImage(texture->target(), 0); TextureGroup* group = group_ref->group.get(); const TextureDefinition& definition = group->GetDefinition(); scoped_refptr<NativeImageBuffer> image_buffer = definition.image(); diff --git a/gpu/command_buffer/service/stream_texture_manager_in_process_android.cc b/gpu/command_buffer/service/stream_texture_manager_in_process_android.cc index 40908a8..7cf814a 100644 --- a/gpu/command_buffer/service/stream_texture_manager_in_process_android.cc +++ b/gpu/command_buffer/service/stream_texture_manager_in_process_android.cc @@ -17,14 +17,14 @@ namespace gpu { namespace { // Simply wraps a SurfaceTexture reference as a GLImage. -class GLImageImpl : public gfx::GLImage { +class GLImageImpl : public gl::GLImage { public: GLImageImpl(uint32 texture_id, gles2::TextureManager* texture_manager, const scoped_refptr<gfx::SurfaceTexture>& surface_texture, const base::Closure& release_callback); - // implement gfx::GLImage + // implement gl::GLImage void Destroy(bool have_context) override; gfx::Size GetSize() override; unsigned GetInternalFormat() override; @@ -168,7 +168,7 @@ GLuint StreamTextureManagerInProcess::CreateStreamTexture( base::Closure release_callback = base::Bind(&StreamTextureManagerInProcess::OnReleaseStreamTexture, weak_factory_.GetWeakPtr(), stream_id); - scoped_refptr<gfx::GLImage> gl_image( + scoped_refptr<gl::GLImage> gl_image( new GLImageImpl(texture->service_id(), texture_manager, surface_texture, release_callback)); diff --git a/gpu/command_buffer/service/texture_definition.cc b/gpu/command_buffer/service/texture_definition.cc index 3f16e85..ed3e8b6 100644 --- a/gpu/command_buffer/service/texture_definition.cc +++ b/gpu/command_buffer/service/texture_definition.cc @@ -25,7 +25,7 @@ namespace gles2 { namespace { -class GLImageSync : public gfx::GLImage { +class GLImageSync : public gl::GLImage { public: explicit GLImageSync(const scoped_refptr<NativeImageBuffer>& buffer, const gfx::Size& size); @@ -124,9 +124,9 @@ class NativeImageBufferEGL : public NativeImageBuffer { private: NativeImageBufferEGL(EGLDisplay display, EGLImageKHR image); ~NativeImageBufferEGL() override; - void AddClient(gfx::GLImage* client) override; - void RemoveClient(gfx::GLImage* client) override; - bool IsClient(gfx::GLImage* client) override; + void AddClient(gl::GLImage* client) override; + void RemoveClient(gl::GLImage* client) override; + bool IsClient(gl::GLImage* client) override; void BindToTexture(GLenum target) const override; const EGLDisplay egl_display_; @@ -135,14 +135,14 @@ class NativeImageBufferEGL : public NativeImageBuffer { base::Lock lock_; struct ClientInfo { - explicit ClientInfo(gfx::GLImage* client); + explicit ClientInfo(gl::GLImage* client); ~ClientInfo(); - gfx::GLImage* client; + gl::GLImage* client; bool needs_wait_before_read; }; std::list<ClientInfo> client_infos_; - gfx::GLImage* write_client_; + gl::GLImage* write_client_; DISALLOW_COPY_AND_ASSIGN(NativeImageBufferEGL); }; @@ -177,7 +177,7 @@ scoped_refptr<NativeImageBufferEGL> NativeImageBufferEGL::Create( return new NativeImageBufferEGL(egl_display, egl_image); } -NativeImageBufferEGL::ClientInfo::ClientInfo(gfx::GLImage* client) +NativeImageBufferEGL::ClientInfo::ClientInfo(gl::GLImage* client) : client(client), needs_wait_before_read(true) {} NativeImageBufferEGL::ClientInfo::~ClientInfo() {} @@ -198,12 +198,12 @@ NativeImageBufferEGL::~NativeImageBufferEGL() { eglDestroyImageKHR(egl_display_, egl_image_); } -void NativeImageBufferEGL::AddClient(gfx::GLImage* client) { +void NativeImageBufferEGL::AddClient(gl::GLImage* client) { base::AutoLock lock(lock_); client_infos_.push_back(ClientInfo(client)); } -void NativeImageBufferEGL::RemoveClient(gfx::GLImage* client) { +void NativeImageBufferEGL::RemoveClient(gl::GLImage* client) { base::AutoLock lock(lock_); if (write_client_ == client) write_client_ = NULL; @@ -218,7 +218,7 @@ void NativeImageBufferEGL::RemoveClient(gfx::GLImage* client) { NOTREACHED(); } -bool NativeImageBufferEGL::IsClient(gfx::GLImage* client) { +bool NativeImageBufferEGL::IsClient(gl::GLImage* client) { base::AutoLock lock(lock_); for (std::list<ClientInfo>::iterator it = client_infos_.begin(); it != client_infos_.end(); @@ -244,9 +244,9 @@ class NativeImageBufferStub : public NativeImageBuffer { private: ~NativeImageBufferStub() override {} - void AddClient(gfx::GLImage* client) override {} - void RemoveClient(gfx::GLImage* client) override {} - bool IsClient(gfx::GLImage* client) override { return true; } + void AddClient(gl::GLImage* client) override {} + void RemoveClient(gl::GLImage* client) override {} + bool IsClient(gl::GLImage* client) override { return true; } void BindToTexture(GLenum target) const override {} DISALLOW_COPY_AND_ASSIGN(NativeImageBufferStub); @@ -342,10 +342,9 @@ TextureDefinition::TextureDefinition( const Texture::FaceInfo& first_face = texture->face_infos_[0]; if (image_buffer_.get()) { - scoped_refptr<gfx::GLImage> gl_image( - new GLImageSync(image_buffer_, - gfx::Size(first_face.level_infos[0].width, - first_face.level_infos[0].height))); + scoped_refptr<gl::GLImage> gl_image(new GLImageSync( + image_buffer_, gfx::Size(first_face.level_infos[0].width, + first_face.level_infos[0].height))); texture->SetLevelImage(target_, 0, gl_image.get(), Texture::BOUND); } @@ -376,7 +375,7 @@ void TextureDefinition::UpdateTextureInternal(Texture* texture) const { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, wrap_t_); if (image_buffer_.get()) { - gfx::GLImage* existing_image = texture->GetLevelImage(target_, 0); + gl::GLImage* existing_image = texture->GetLevelImage(target_, 0); // Don't need to re-bind if already bound before. if (!existing_image || !image_buffer_->IsClient(existing_image)) { image_buffer_->BindToTexture(target_); diff --git a/gpu/command_buffer/service/texture_definition.h b/gpu/command_buffer/service/texture_definition.h index 9426fc4..bc1393c 100644 --- a/gpu/command_buffer/service/texture_definition.h +++ b/gpu/command_buffer/service/texture_definition.h @@ -11,7 +11,7 @@ #include "gpu/command_buffer/service/gl_utils.h" #include "ui/gfx/geometry/rect.h" -namespace gfx { +namespace gl { class GLImage; } @@ -24,9 +24,9 @@ class NativeImageBuffer : public base::RefCountedThreadSafe<NativeImageBuffer> { public: static scoped_refptr<NativeImageBuffer> Create(GLuint texture_id); - virtual void AddClient(gfx::GLImage* client) = 0; - virtual void RemoveClient(gfx::GLImage* client) = 0; - virtual bool IsClient(gfx::GLImage* client) = 0; + virtual void AddClient(gl::GLImage* client) = 0; + virtual void RemoveClient(gl::GLImage* client) = 0; + virtual bool IsClient(gl::GLImage* client) = 0; virtual void BindToTexture(GLenum target) const = 0; protected: diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc index ec0aec1..d883622 100644 --- a/gpu/command_buffer/service/texture_manager.cc +++ b/gpu/command_buffer/service/texture_manager.cc @@ -1240,7 +1240,7 @@ bool Texture::ClearLevel( void Texture::SetLevelImage(GLenum target, GLint level, - gfx::GLImage* image, + gl::GLImage* image, ImageState state) { DCHECK_GE(level, 0); size_t face_index = GLES2Util::GLTargetToFaceIndex(target); @@ -1258,9 +1258,9 @@ void Texture::SetLevelImage(GLenum target, UpdateHasImages(); } -gfx::GLImage* Texture::GetLevelImage(GLint target, - GLint level, - ImageState* state) const { +gl::GLImage* Texture::GetLevelImage(GLint target, + GLint level, + ImageState* state) const { if (target != GL_TEXTURE_2D && target != GL_TEXTURE_EXTERNAL_OES && target != GL_TEXTURE_RECTANGLE_ARB) { return NULL; @@ -1279,7 +1279,7 @@ gfx::GLImage* Texture::GetLevelImage(GLint target, return NULL; } -gfx::GLImage* Texture::GetLevelImage(GLint target, GLint level) const { +gl::GLImage* Texture::GetLevelImage(GLint target, GLint level) const { return GetLevelImage(target, level, nullptr); } @@ -1725,7 +1725,7 @@ GLsizei TextureManager::ComputeMipMapCount(GLenum target, void TextureManager::SetLevelImage(TextureRef* ref, GLenum target, GLint level, - gfx::GLImage* image, + gl::GLImage* image, Texture::ImageState state) { DCHECK(ref); ref->texture()->SetLevelImage(target, level, image, state); diff --git a/gpu/command_buffer/service/texture_manager.h b/gpu/command_buffer/service/texture_manager.h index 62b81d2..a18e278 100644 --- a/gpu/command_buffer/service/texture_manager.h +++ b/gpu/command_buffer/service/texture_manager.h @@ -152,15 +152,15 @@ class GPU_EXPORT Texture { // Set the image for a particular level. void SetLevelImage(GLenum target, GLint level, - gfx::GLImage* image, + gl::GLImage* image, ImageState state); // Get the image associated with a particular level. Returns NULL if level // does not exist. - gfx::GLImage* GetLevelImage(GLint target, - GLint level, - ImageState* state) const; - gfx::GLImage* GetLevelImage(GLint target, GLint level) const; + gl::GLImage* GetLevelImage(GLint target, + GLint level, + ImageState* state) const; + gl::GLImage* GetLevelImage(GLint target, GLint level) const; bool HasImages() const { return has_images_; @@ -263,7 +263,7 @@ class GPU_EXPORT Texture { GLint border; GLenum format; GLenum type; - scoped_refptr<gfx::GLImage> image; + scoped_refptr<gl::GLImage> image; ImageState image_state; uint32 estimated_size; }; @@ -809,7 +809,7 @@ class GPU_EXPORT TextureManager : public base::trace_event::MemoryDumpProvider { void SetLevelImage(TextureRef* ref, GLenum target, GLint level, - gfx::GLImage* image, + gl::GLImage* image, Texture::ImageState state); size_t GetSignatureSize() const; diff --git a/gpu/command_buffer/service/texture_manager_unittest.cc b/gpu/command_buffer/service/texture_manager_unittest.cc index 516f478..dc01e7a 100644 --- a/gpu/command_buffer/service/texture_manager_unittest.cc +++ b/gpu/command_buffer/service/texture_manager_unittest.cc @@ -1390,7 +1390,7 @@ TEST_F(TextureTest, GetLevelImage) { Texture* texture = texture_ref_->texture(); EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_2D, 1) == NULL); // Set image. - scoped_refptr<gfx::GLImage> image(new gfx::GLImageStub); + scoped_refptr<gl::GLImage> image(new gl::GLImageStub); manager_->SetLevelImage(texture_ref_.get(), GL_TEXTURE_2D, 1, image.get(), Texture::BOUND); EXPECT_FALSE(texture->GetLevelImage(GL_TEXTURE_2D, 1) == NULL); @@ -1737,7 +1737,7 @@ TEST_P(ProduceConsumeTextureTest, ProduceConsumeTextureWithImage) { manager_->SetTarget(texture_ref_.get(), target); Texture* texture = texture_ref_->texture(); EXPECT_EQ(static_cast<GLenum>(target), texture->target()); - scoped_refptr<gfx::GLImage> image(new gfx::GLImageStub); + scoped_refptr<gl::GLImage> image(new gl::GLImageStub); manager_->SetLevelInfo(texture_ref_.get(), target, 0, GL_RGBA, 0, 0, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, gfx::Rect()); manager_->SetLevelImage(texture_ref_.get(), target, 0, image.get(), @@ -2060,14 +2060,14 @@ TEST_F(SharedTextureTest, Images) { EXPECT_FALSE(ref2->texture()->HasImages()); EXPECT_FALSE(texture_manager1_->HaveImages()); EXPECT_FALSE(texture_manager2_->HaveImages()); - scoped_refptr<gfx::GLImage> image1(new gfx::GLImageStub); + scoped_refptr<gl::GLImage> image1(new gl::GLImageStub); texture_manager1_->SetLevelImage(ref1.get(), GL_TEXTURE_2D, 1, image1.get(), Texture::BOUND); EXPECT_TRUE(ref1->texture()->HasImages()); EXPECT_TRUE(ref2->texture()->HasImages()); EXPECT_TRUE(texture_manager1_->HaveImages()); EXPECT_TRUE(texture_manager2_->HaveImages()); - scoped_refptr<gfx::GLImage> image2(new gfx::GLImageStub); + scoped_refptr<gl::GLImage> image2(new gl::GLImageStub); texture_manager1_->SetLevelImage(ref1.get(), GL_TEXTURE_2D, 1, image2.get(), Texture::BOUND); EXPECT_TRUE(ref1->texture()->HasImages()); |