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

Unified Diff: gpu/command_buffer/service/texture_manager.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, 7 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 | « gpu/command_buffer/service/texture_manager.h ('k') | gpu/ipc/service/stream_texture_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/texture_manager.cc
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc
index ba79b2a3890fe5bdce0c3f75fc42ecdc21000f8e..52a00db5c3a3ca7c206ec99dde96c6740212f7c5 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -1500,13 +1500,16 @@ void Texture::SetLevelImage(GLenum target,
GLint level,
gl::GLImage* image,
ImageState state) {
+ SetStreamTextureServiceId(0);
liberato (no reviews please) 2016/06/01 14:10:44 maybe just clear it if image != whatever is bound
watk 2016/06/01 20:54:44 Sounds good. Done. The API is fairly consistent no
SetLevelImageInternal(target, level, image, nullptr, state);
}
void Texture::SetLevelStreamTextureImage(GLenum target,
GLint level,
GLStreamTextureImage* image,
- ImageState state) {
+ ImageState state,
+ GLuint service_id) {
+ SetStreamTextureServiceId(service_id);
SetLevelImageInternal(target, level, image, image, state);
}
@@ -1619,7 +1622,7 @@ bool Texture::CanRenderTo(const FeatureInfo* feature_info, GLint level) const {
return (color_renderable || depth_renderable || stencil_renderable);
}
-void Texture::SetUnownedServiceId(GLuint service_id) {
+void Texture::SetStreamTextureServiceId(GLuint service_id) {
GLuint new_service_id = service_id;
// Take no action if this isn't an OES_EXTERNAL texture.
@@ -2100,9 +2103,11 @@ void TextureManager::SetLevelStreamTextureImage(TextureRef* ref,
GLenum target,
GLint level,
GLStreamTextureImage* image,
- Texture::ImageState state) {
+ Texture::ImageState state,
+ GLuint service_id) {
DCHECK(ref);
- ref->texture()->SetLevelStreamTextureImage(target, level, image, state);
+ ref->texture()->SetLevelStreamTextureImage(target, level, image, state,
+ service_id);
}
size_t TextureManager::GetSignatureSize() const {
« no previous file with comments | « gpu/command_buffer/service/texture_manager.h ('k') | gpu/ipc/service/stream_texture_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698