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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 2014313002: StreamTextureImages can now override a Texture's service id (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Partially implemented tying unowned id to StreamTextureImage Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 8177 matching lines...) Expand 10 before | Expand all | Expand 10 after
8188 void GLES2DecoderImpl::PerformanceWarning( 8188 void GLES2DecoderImpl::PerformanceWarning(
8189 const char* filename, int line, const std::string& msg) { 8189 const char* filename, int line, const std::string& msg) {
8190 logger_.LogMessage(filename, line, 8190 logger_.LogMessage(filename, line,
8191 std::string("PERFORMANCE WARNING: ") + msg); 8191 std::string("PERFORMANCE WARNING: ") + msg);
8192 } 8192 }
8193 8193
8194 void GLES2DecoderImpl::DoCopyTexImage(Texture* texture, 8194 void GLES2DecoderImpl::DoCopyTexImage(Texture* texture,
8195 GLenum textarget, 8195 GLenum textarget,
8196 gl::GLImage* image) { 8196 gl::GLImage* image) {
8197 // Note: We update the state to COPIED prior to calling CopyTexImage() 8197 // Note: We update the state to COPIED prior to calling CopyTexImage()
8198 // as that allows the GLImage implemenatation to set it back to UNBOUND 8198 // as that allows the GLImage implementation to set it back to UNBOUND
8199 // and ensure that CopyTexImage() is called each time the texture is 8199 // and ensure that CopyTexImage() is called each time the texture is
8200 // used. 8200 // used.
8201 // XXX: This breaks everything because it clears the unowned service id and
8202 // restores the EOS binding to the owned service id, but
8203 // AVDACodecImage::CopyTexImage expects the SurfaceTexture texture to be
8204 // bound.
8201 texture->SetLevelImage(textarget, 0, image, Texture::COPIED); 8205 texture->SetLevelImage(textarget, 0, image, Texture::COPIED);
8202 bool rv = image->CopyTexImage(textarget); 8206 bool rv = image->CopyTexImage(textarget);
8203 DCHECK(rv) << "Both BindTexImage() and CopyTexImage() failed"; 8207 DCHECK(rv) << "Both BindTexImage() and CopyTexImage() failed";
8204 } 8208 }
8205 8209
8206 void GLES2DecoderImpl::DoCopyTexImageIfNeeded(Texture* texture, 8210 void GLES2DecoderImpl::DoCopyTexImageIfNeeded(Texture* texture,
8207 GLenum textarget) { 8211 GLenum textarget) {
8208 // Image is already in use if texture is attached to a framebuffer. 8212 // Image is already in use if texture is attached to a framebuffer.
8209 if (texture && !texture->IsAttachedToFramebuffer()) { 8213 if (texture && !texture->IsAttachedToFramebuffer()) {
8210 Texture::ImageState image_state; 8214 Texture::ImageState image_state;
(...skipping 8614 matching lines...) Expand 10 before | Expand all | Expand 10 after
16825 } 16829 }
16826 16830
16827 // Include the auto-generated part of this file. We split this because it means 16831 // Include the auto-generated part of this file. We split this because it means
16828 // we can easily edit the non-auto generated parts right here in this file 16832 // we can easily edit the non-auto generated parts right here in this file
16829 // instead of having to edit some template or the code generator. 16833 // instead of having to edit some template or the code generator.
16830 #include "base/macros.h" 16834 #include "base/macros.h"
16831 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 16835 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
16832 16836
16833 } // namespace gles2 16837 } // namespace gles2
16834 } // namespace gpu 16838 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/texture_manager.h » ('j') | gpu/command_buffer/service/texture_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698