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

Side by Side Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 11416117: Hookup the GPUTrace events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | Annotate | Revision Log
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 // A class to emulate GLES2 over command buffers. 5 // A class to emulate GLES2 over command buffers.
6 6
7 #include "../client/gles2_implementation.h" 7 #include "../client/gles2_implementation.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 3591 matching lines...) Expand 10 before | Expand all | Expand 10 after
3602 GPU_CLIENT_SINGLE_THREAD_CHECK(); 3602 GPU_CLIENT_SINGLE_THREAD_CHECK();
3603 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glPopGroupMarkerEXT()"); 3603 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glPopGroupMarkerEXT()");
3604 helper_->PopGroupMarkerEXT(); 3604 helper_->PopGroupMarkerEXT();
3605 debug_marker_manager_.PopGroup(); 3605 debug_marker_manager_.PopGroup();
3606 } 3606 }
3607 3607
3608 void GLES2Implementation::TraceBeginCHROMIUM(const char* name) { 3608 void GLES2Implementation::TraceBeginCHROMIUM(const char* name) {
3609 GPU_CLIENT_SINGLE_THREAD_CHECK(); 3609 GPU_CLIENT_SINGLE_THREAD_CHECK();
3610 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glTraceBeginCHROMIUM(" 3610 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glTraceBeginCHROMIUM("
3611 << name << ")"); 3611 << name << ")");
3612 3612 TRACE_EVENT_ASYNC_BEGIN0("gpu", "GLES2::Trace", this);
3613 SetBucketAsCString(kResultBucketId, name); 3613 SetBucketAsCString(kResultBucketId, name);
3614 helper_->TraceBeginCHROMIUM(kResultBucketId); 3614 helper_->TraceBeginCHROMIUM(kResultBucketId);
3615 helper_->SetBucketSize(kResultBucketId, 0); 3615 helper_->SetBucketSize(kResultBucketId, 0);
3616 } 3616 }
3617 3617
3618 void GLES2Implementation::TraceEndCHROMIUM() {
3619 GPU_CLIENT_SINGLE_THREAD_CHECK();
3620 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glTraceEndCHROMIUM(" << ")");
3621 helper_->TraceEndCHROMIUM();
3622 TRACE_EVENT_ASYNC_END0("gpu", "GLES2::Trace", this);
3623 }
3624
3618 void* GLES2Implementation::MapBufferCHROMIUM(GLuint target, GLenum access) { 3625 void* GLES2Implementation::MapBufferCHROMIUM(GLuint target, GLenum access) {
3619 GPU_CLIENT_SINGLE_THREAD_CHECK(); 3626 GPU_CLIENT_SINGLE_THREAD_CHECK();
3620 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glMapBufferCHROMIUM(" 3627 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glMapBufferCHROMIUM("
3621 << target << ", " << GLES2Util::GetStringEnum(access) << ")"); 3628 << target << ", " << GLES2Util::GetStringEnum(access) << ")");
3622 if (target != GL_PIXEL_UNPACK_TRANSFER_BUFFER_CHROMIUM) { 3629 if (target != GL_PIXEL_UNPACK_TRANSFER_BUFFER_CHROMIUM) {
3623 SetGLError( 3630 SetGLError(
3624 GL_INVALID_ENUM, "glMapBufferCHROMIUM", "invalid target"); 3631 GL_INVALID_ENUM, "glMapBufferCHROMIUM", "invalid target");
3625 return NULL; 3632 return NULL;
3626 } 3633 }
3627 if (access != GL_WRITE_ONLY) { 3634 if (access != GL_WRITE_ONLY) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
3668 return true; 3675 return true;
3669 } 3676 }
3670 3677
3671 // Include the auto-generated part of this file. We split this because it means 3678 // Include the auto-generated part of this file. We split this because it means
3672 // we can easily edit the non-auto generated parts right here in this file 3679 // we can easily edit the non-auto generated parts right here in this file
3673 // instead of having to edit some template or the code generator. 3680 // instead of having to edit some template or the code generator.
3674 #include "../client/gles2_implementation_impl_autogen.h" 3681 #include "../client/gles2_implementation_impl_autogen.h"
3675 3682
3676 } // namespace gles2 3683 } // namespace gles2
3677 } // namespace gpu 3684 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698