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

Side by Side Diff: content/common/gpu/client/gl_helper_unittests.cc

Issue 109933006: Implement sampling profiler (chromium side change) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/tracing/tracing_ui.cc ('k') | 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 <stdio.h> 5 #include <stdio.h>
6 #include <cmath> 6 #include <cmath>
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include <GLES2/gl2.h> 10 #include <GLES2/gl2.h>
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 virtual void TearDown() { 77 virtual void TearDown() {
78 helper_scaling_.reset(NULL); 78 helper_scaling_.reset(NULL);
79 helper_.reset(NULL); 79 helper_.reset(NULL);
80 context_.reset(NULL); 80 context_.reset(NULL);
81 } 81 }
82 82
83 void StartTracing(const std::string& filter) { 83 void StartTracing(const std::string& filter) {
84 base::debug::TraceLog::GetInstance()->SetEnabled( 84 base::debug::TraceLog::GetInstance()->SetEnabled(
85 base::debug::CategoryFilter(filter), 85 base::debug::CategoryFilter(filter),
86 base::debug::TraceLog::RECORDING_MODE,
86 base::debug::TraceLog::RECORD_UNTIL_FULL); 87 base::debug::TraceLog::RECORD_UNTIL_FULL);
87 } 88 }
88 89
89 static void TraceDataCB( 90 static void TraceDataCB(
90 const base::Callback<void()>& callback, 91 const base::Callback<void()>& callback,
91 std::string* output, 92 std::string* output,
92 const scoped_refptr<base::RefCountedString>& json_events_str, 93 const scoped_refptr<base::RefCountedString>& json_events_str,
93 bool has_more_events) { 94 bool has_more_events) {
94 if (output->size() > 1) { 95 if (output->size() > 1) {
95 output->append(","); 96 output->append(",");
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after
1384 #if defined(TOOLKIT_GTK) 1385 #if defined(TOOLKIT_GTK)
1385 gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); 1386 gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess());
1386 #endif 1387 #endif
1387 gfx::GLSurface::InitializeOneOff(); 1388 gfx::GLSurface::InitializeOneOff();
1388 gpu::ApplyGpuDriverBugWorkarounds(CommandLine::ForCurrentProcess()); 1389 gpu::ApplyGpuDriverBugWorkarounds(CommandLine::ForCurrentProcess());
1389 1390
1390 content::UnitTestTestSuite runner(suite); 1391 content::UnitTestTestSuite runner(suite);
1391 base::MessageLoop message_loop; 1392 base::MessageLoop message_loop;
1392 return runner.Run(); 1393 return runner.Run();
1393 } 1394 }
OLDNEW
« no previous file with comments | « content/browser/tracing/tracing_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698