Home | History | Annotate | Download | only in gpu
      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
      3 // found in the LICENSE file.
      4 
      5 #include "content/common/gpu/gpu_rendering_stats.h"
      6 
      7 namespace content {
      8 
      9 GpuRenderingStats::GpuRenderingStats()
     10     : global_texture_upload_count(0),
     11       texture_upload_count(0),
     12       global_video_memory_bytes_allocated(0) {
     13 }
     14 
     15 GpuRenderingStats::~GpuRenderingStats() {
     16 }
     17 
     18 void GpuRenderingStats::EnumerateFields(
     19     cc::RenderingStats::Enumerator* enumerator) const {
     20   enumerator->AddInt("globalTextureUploadCount", global_texture_upload_count);
     21   enumerator->AddTimeDeltaInSecondsF("globalTotalTextureUploadTimeInSeconds",
     22                                      global_total_texture_upload_time);
     23   enumerator->AddInt("textureUploadCount", texture_upload_count);
     24   enumerator->AddTimeDeltaInSecondsF("totalTextureUploadTimeInSeconds",
     25                            total_texture_upload_time);
     26   enumerator->AddTimeDeltaInSecondsF(
     27       "globalTotalProcessingCommandsTimeInSeconds",
     28       global_total_processing_commands_time);
     29   enumerator->AddTimeDeltaInSecondsF("totalProcessingCommandsTimeInSeconds",
     30                                      total_processing_commands_time);
     31   enumerator->AddInt64("globalVideoMemoryBytesAllocated",
     32                        global_video_memory_bytes_allocated);
     33 }
     34 
     35 }  // namespace content
     36