Chromium Code Reviews| Index: gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc |
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc |
| index f3a19dc7527d93446ccadc38cbbb9e8ac4fbca2c..d921ac3542c0c171358f961370a413f00cd49834 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc |
| @@ -11,6 +11,10 @@ |
| namespace gpu { |
| namespace gles2 { |
| +PassthroughResources::PassthroughResources() {} |
| + |
| +PassthroughResources::~PassthroughResources() {} |
|
piman
2016/09/13 01:07:32
If there are still resources in here, they should
Geoff Lang
2016/09/13 17:49:57
Done, fixed the destruction logic. asserts are no
|
| + |
| GLES2DecoderPassthroughImpl::GLES2DecoderPassthroughImpl(ContextGroup* group) |
| : commands_to_process_(0), |
| debug_marker_manager_(), |
| @@ -113,6 +117,17 @@ bool GLES2DecoderPassthroughImpl::Initialize( |
| image_manager_.reset(new ImageManager()); |
| + resources_ = group_->passthrough_resources(); |
| + |
| + mailbox_manager_ = group_->mailbox_manager(); |
| + |
| + // Query information about the texture units |
| + GLint num_texture_units = 0; |
| + glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &num_texture_units); |
| + |
| + active_texture_unit_ = 0; |
| + bound_textures_.resize(num_texture_units, 0); |
| + |
| set_initialized(); |
| return true; |
| } |
| @@ -175,11 +190,11 @@ gl::GLContext* GLES2DecoderPassthroughImpl::GetGLContext() { |
| } |
| gpu::gles2::ContextGroup* GLES2DecoderPassthroughImpl::GetContextGroup() { |
| - return nullptr; |
| + return group_.get(); |
| } |
| const FeatureInfo* GLES2DecoderPassthroughImpl::GetFeatureInfo() const { |
| - return nullptr; |
| + return group_->feature_info(); |
| } |
| gpu::Capabilities GLES2DecoderPassthroughImpl::GetCapabilities() { |
| @@ -294,10 +309,14 @@ size_t GLES2DecoderPassthroughImpl::GetCreatedBackTextureCountForTest() { |
| } |
| void GLES2DecoderPassthroughImpl::SetFenceSyncReleaseCallback( |
| - const FenceSyncReleaseCallback& callback) {} |
| + const FenceSyncReleaseCallback& callback) { |
| + fence_sync_release_callback_ = callback; |
| +} |
| void GLES2DecoderPassthroughImpl::SetWaitFenceSyncCallback( |
| - const WaitFenceSyncCallback& callback) {} |
| + const WaitFenceSyncCallback& callback) { |
| + wait_fence_sync_callback_ = callback; |
| +} |
| void GLES2DecoderPassthroughImpl::SetDescheduleUntilFinishedCallback( |
| const NoParamCallback& callback) {} |
| @@ -344,7 +363,8 @@ void GLES2DecoderPassthroughImpl::PerformPollingWork() {} |
| bool GLES2DecoderPassthroughImpl::GetServiceTextureId( |
| uint32_t client_texture_id, |
| uint32_t* service_texture_id) { |
| - return false; |
| + return resources_->texture_id_map.GetServiceID(client_texture_id, |
| + service_texture_id); |
| } |
| gpu::error::ContextLostReason |