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

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

Issue 12888005: gpu: Add traces to Produce/Consume texture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add more info. Created 7 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stdio.h> 7 #include <stdio.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <list> 10 #include <list>
(...skipping 9945 matching lines...) Expand 10 before | Expand all | Expand 10 after
9956 Bucket* bucket = CreateBucket(bucket_id); 9956 Bucket* bucket = CreateBucket(bucket_id);
9957 9957
9958 bucket->SetSize(GL_MAILBOX_SIZE_CHROMIUM); 9958 bucket->SetSize(GL_MAILBOX_SIZE_CHROMIUM);
9959 bucket->SetData(&name, 0, GL_MAILBOX_SIZE_CHROMIUM); 9959 bucket->SetData(&name, 0, GL_MAILBOX_SIZE_CHROMIUM);
9960 9960
9961 return error::kNoError; 9961 return error::kNoError;
9962 } 9962 }
9963 9963
9964 void GLES2DecoderImpl::DoProduceTextureCHROMIUM(GLenum target, 9964 void GLES2DecoderImpl::DoProduceTextureCHROMIUM(GLenum target,
9965 const GLbyte* mailbox) { 9965 const GLbyte* mailbox) {
9966 TRACE_EVENT2("gpu", "GLES2DecoderImpl::DoProduceTextureCHROMIUM",
9967 "context", GetLogPrefix(),
9968 "mailbox[0]", static_cast<unsigned char>(mailbox[0]));
9969
9966 Texture* texture = GetTextureInfoForTarget(target); 9970 Texture* texture = GetTextureInfoForTarget(target);
9967 if (!texture) { 9971 if (!texture) {
9968 LOCAL_SET_GL_ERROR( 9972 LOCAL_SET_GL_ERROR(
9969 GL_INVALID_OPERATION, 9973 GL_INVALID_OPERATION,
9970 "glProduceTextureCHROMIUM", "unknown texture for target"); 9974 "glProduceTextureCHROMIUM", "unknown texture for target");
9971 return; 9975 return;
9972 } 9976 }
9973 9977
9974 TextureDefinition* definition = texture_manager()->Save(texture); 9978 TextureDefinition* definition = texture_manager()->Save(texture);
9975 if (!definition) { 9979 if (!definition) {
(...skipping 15 matching lines...) Expand all
9991 GL_INVALID_OPERATION, 9995 GL_INVALID_OPERATION,
9992 "glProduceTextureCHROMIUM", "invalid mailbox name"); 9996 "glProduceTextureCHROMIUM", "invalid mailbox name");
9993 return; 9997 return;
9994 } 9998 }
9995 9999
9996 glBindTexture(texture->target(), texture->service_id()); 10000 glBindTexture(texture->target(), texture->service_id());
9997 } 10001 }
9998 10002
9999 void GLES2DecoderImpl::DoConsumeTextureCHROMIUM(GLenum target, 10003 void GLES2DecoderImpl::DoConsumeTextureCHROMIUM(GLenum target,
10000 const GLbyte* mailbox) { 10004 const GLbyte* mailbox) {
10005 TRACE_EVENT2("gpu", "GLES2DecoderImpl::DoConsumeTextureCHROMIUM",
10006 "context", GetLogPrefix(),
10007 "mailbox[0]", static_cast<unsigned char>(mailbox[0]));
10008
10001 Texture* texture = GetTextureInfoForTarget(target); 10009 Texture* texture = GetTextureInfoForTarget(target);
10002 if (!texture) { 10010 if (!texture) {
10003 LOCAL_SET_GL_ERROR( 10011 LOCAL_SET_GL_ERROR(
10004 GL_INVALID_OPERATION, 10012 GL_INVALID_OPERATION,
10005 "glConsumeTextureCHROMIUM", "unknown texture for target"); 10013 "glConsumeTextureCHROMIUM", "unknown texture for target");
10006 return; 10014 return;
10007 } 10015 }
10008 10016
10009 scoped_ptr<TextureDefinition> definition( 10017 scoped_ptr<TextureDefinition> definition(
10010 group_->mailbox_manager()->ConsumeTexture( 10018 group_->mailbox_manager()->ConsumeTexture(
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
10453 return error::kNoError; 10461 return error::kNoError;
10454 } 10462 }
10455 10463
10456 // Include the auto-generated part of this file. We split this because it means 10464 // Include the auto-generated part of this file. We split this because it means
10457 // we can easily edit the non-auto generated parts right here in this file 10465 // we can easily edit the non-auto generated parts right here in this file
10458 // instead of having to edit some template or the code generator. 10466 // instead of having to edit some template or the code generator.
10459 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 10467 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
10460 10468
10461 } // namespace gles2 10469 } // namespace gles2
10462 } // namespace gpu 10470 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698