summaryrefslogtreecommitdiff
path: root/chromium/content/common/gpu/gpu_rendering_stats.h
blob: ab2485372017780823a36798177a7bdcd4a200e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CONTENT_COMMON_GPU_GPU_RENDERING_STATS_H_
#define CONTENT_COMMON_GPU_GPU_RENDERING_STATS_H_

#include "base/time/time.h"
#include "cc/debug/rendering_stats.h"
#include "content/common/content_export.h"

namespace content {

struct CONTENT_EXPORT GpuRenderingStats {
  GpuRenderingStats();
  ~GpuRenderingStats();

  int global_texture_upload_count;
  base::TimeDelta global_total_texture_upload_time;
  int texture_upload_count;
  base::TimeDelta total_texture_upload_time;
  base::TimeDelta global_total_processing_commands_time;
  base::TimeDelta total_processing_commands_time;
  int64 global_video_memory_bytes_allocated;
  // Note: when adding new members, please remember to update enumerateFields
  // in gpu_rendering_stats.cc.

  // Outputs the fields in this structure to the provided enumerator.
  void EnumerateFields(cc::RenderingStats::Enumerator* enumerator) const;
};

}  // namespace content

#endif  // CONTENT_PUBLIC_COMMON_RENDERING_STATS_H_