| OLD | NEW |
| 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 "content/renderer/gpu/gpu_benchmarking_extension.h" | 5 #include "content/renderer/gpu/gpu_benchmarking_extension.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 stats_object->Set(v8::String::New("totalRasterizeTimeInSeconds"), | 169 stats_object->Set(v8::String::New("totalRasterizeTimeInSeconds"), |
| 170 v8::Number::New(stats.totalRasterizeTimeInSeconds)); | 170 v8::Number::New(stats.totalRasterizeTimeInSeconds)); |
| 171 stats_object->Set(v8::String::New("totalCommitTimeInSeconds"), | 171 stats_object->Set(v8::String::New("totalCommitTimeInSeconds"), |
| 172 v8::Number::New(stats.totalCommitTimeInSeconds)); | 172 v8::Number::New(stats.totalCommitTimeInSeconds)); |
| 173 stats_object->Set(v8::String::New("totalCommitCount"), | 173 stats_object->Set(v8::String::New("totalCommitCount"), |
| 174 v8::Integer::New(stats.totalCommitCount)); | 174 v8::Integer::New(stats.totalCommitCount)); |
| 175 stats_object->Set(v8::String::New("numImplThreadScrolls"), | 175 stats_object->Set(v8::String::New("numImplThreadScrolls"), |
| 176 v8::Integer::New(stats.numImplThreadScrolls)); | 176 v8::Integer::New(stats.numImplThreadScrolls)); |
| 177 stats_object->Set(v8::String::New("numMainThreadScrolls"), | 177 stats_object->Set(v8::String::New("numMainThreadScrolls"), |
| 178 v8::Integer::New(stats.numMainThreadScrolls)); | 178 v8::Integer::New(stats.numMainThreadScrolls)); |
| 179 stats_object->Set(v8::String::New("totalPixelsPainted"), |
| 180 v8::Integer::New(stats.totalPixelsPainted)); |
| 181 stats_object->Set(v8::String::New("totalPixelsRasterized"), |
| 182 v8::Integer::New(stats.totalPixelsRasterized)); |
| 179 | 183 |
| 180 stats_object->Set(v8::String::New("globalTextureUploadCount"), | 184 stats_object->Set(v8::String::New("globalTextureUploadCount"), |
| 181 v8::Number::New(gpu_stats.global_texture_upload_count)); | 185 v8::Number::New(gpu_stats.global_texture_upload_count)); |
| 182 stats_object->Set( | 186 stats_object->Set( |
| 183 v8::String::New("globalTotalTextureUploadTimeInSeconds"), | 187 v8::String::New("globalTotalTextureUploadTimeInSeconds"), |
| 184 v8::Number::New( | 188 v8::Number::New( |
| 185 gpu_stats.global_total_texture_upload_time.InSecondsF())); | 189 gpu_stats.global_total_texture_upload_time.InSecondsF())); |
| 186 stats_object->Set(v8::String::New("textureUploadCount"), | 190 stats_object->Set(v8::String::New("textureUploadCount"), |
| 187 v8::Number::New(gpu_stats.texture_upload_count)); | 191 v8::Number::New(gpu_stats.texture_upload_count)); |
| 188 stats_object->Set( | 192 stats_object->Set( |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 | 372 |
| 369 return results; | 373 return results; |
| 370 } | 374 } |
| 371 }; | 375 }; |
| 372 | 376 |
| 373 v8::Extension* GpuBenchmarkingExtension::Get() { | 377 v8::Extension* GpuBenchmarkingExtension::Get() { |
| 374 return new GpuBenchmarkingWrapper(); | 378 return new GpuBenchmarkingWrapper(); |
| 375 } | 379 } |
| 376 | 380 |
| 377 } // namespace content | 381 } // namespace content |
| OLD | NEW |