Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 2315313003: Add a base class of Texture for interfacing with the mailbox manager. (Closed)
Patch Set: Address piman's comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/service/mailbox_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 7a0243a18d839a4f260dec14eee529a14ddd6c34..b1039c98a9deef97378f9c15553905196c95305a 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -4791,7 +4791,9 @@ void GLES2DecoderImpl::TakeFrontBuffer(const Mailbox& mailbox) {
}
void GLES2DecoderImpl::ReturnFrontBuffer(const Mailbox& mailbox, bool is_lost) {
- Texture* texture = mailbox_manager()->ConsumeTexture(mailbox);
+ Texture* texture =
+ static_cast<Texture*>(group_->mailbox_manager()->ConsumeTexture(mailbox));
+
for (auto it = saved_back_textures_.begin(); it != saved_back_textures_.end();
++it) {
if (texture != it->back_texture->texture_ref()->texture())
@@ -16051,7 +16053,9 @@ void GLES2DecoderImpl::DoConsumeTextureCHROMIUM(GLenum target,
"glConsumeTextureCHROMIUM", "unknown texture for target");
return;
}
- Texture* texture = group_->mailbox_manager()->ConsumeTexture(mailbox);
+
+ Texture* texture =
+ static_cast<Texture*>(group_->mailbox_manager()->ConsumeTexture(mailbox));
if (!texture) {
LOCAL_SET_GL_ERROR(
GL_INVALID_OPERATION,
@@ -16111,7 +16115,8 @@ void GLES2DecoderImpl::DoCreateAndConsumeTextureINTERNAL(
"glCreateAndConsumeTextureCHROMIUM", "client id already in use");
return;
}
- Texture* texture = group_->mailbox_manager()->ConsumeTexture(mailbox);
+ Texture* texture =
+ static_cast<Texture*>(group_->mailbox_manager()->ConsumeTexture(mailbox));
if (!texture) {
EnsureTextureForClientId(target, client_id);
LOCAL_SET_GL_ERROR(
« no previous file with comments | « no previous file | gpu/command_buffer/service/mailbox_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698