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

Side by Side Diff: debugger/QT/SkDebuggerGUI.cpp

Issue 194973003: Alter bench_pictures to "respect" the logPerIter flag (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 9 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 | « no previous file | tools/PictureBenchmark.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkDebuggerGUI.h" 8 #include "SkDebuggerGUI.h"
9 #include "SkForceLinking.h" 9 #include "SkForceLinking.h"
10 #include "SkGraphics.h" 10 #include "SkGraphics.h"
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 316
317 SkASSERT(renderer != NULL); 317 SkASSERT(renderer != NULL);
318 if (NULL == renderer) { 318 if (NULL == renderer) {
319 return; 319 return;
320 } 320 }
321 321
322 renderer->init(pict); 322 renderer->init(pict);
323 323
324 renderer->setup(); 324 renderer->setup();
325 renderer->render(NULL); 325 renderer->render(NULL);
326 renderer->resetState(true); 326 renderer->resetState(true); // flush, swapBuffers and Finish
327 327
328 // We throw this away the first batch of times to remove first time effects (such as paging in this program) 328 // We throw this away the first batch of times to remove first time effects (such as paging in this program)
329 pict->resetTimes(); 329 pict->resetTimes();
330 330
331 for (int i = 0; i < repeats; ++i) { 331 for (int i = 0; i < repeats; ++i) {
332 renderer->setup(); 332 renderer->setup();
333 renderer->render(NULL); 333 renderer->render(NULL);
334 renderer->resetState(true); 334 renderer->resetState(false); // flush & swapBuffers, but don't Finish
335 } 335 }
336 renderer->resetState(true); // flush, swapBuffers and Finish
336 337
337 renderer->end(); 338 renderer->end();
338 } 339 }
339 340
340 void SkDebuggerGUI::actionProfile() { 341 void SkDebuggerGUI::actionProfile() {
341 // In order to profile we pass the command offsets (that were read-in 342 // In order to profile we pass the command offsets (that were read-in
342 // in loadPicture by the SkOffsetPicture) to an SkTimedPlaybackPicture. 343 // in loadPicture by the SkOffsetPicture) to an SkTimedPlaybackPicture.
343 // The SkTimedPlaybackPicture in turn passes the offsets to an 344 // The SkTimedPlaybackPicture in turn passes the offsets to an
344 // SkTimedPicturePlayback object which uses them to track the performance 345 // SkTimedPicturePlayback object which uses them to track the performance
345 // of individual commands. 346 // of individual commands.
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 } 1043 }
1043 1044
1044 // NOTE(chudy): Makes first item unselectable. 1045 // NOTE(chudy): Makes first item unselectable.
1045 QStandardItemModel* model = qobject_cast<QStandardItemModel*>( 1046 QStandardItemModel* model = qobject_cast<QStandardItemModel*>(
1046 fFilter.model()); 1047 fFilter.model());
1047 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(), 1048 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(),
1048 fFilter.rootModelIndex()); 1049 fFilter.rootModelIndex());
1049 QStandardItem* firstItem = model->itemFromIndex(firstIndex); 1050 QStandardItem* firstItem = model->itemFromIndex(firstIndex);
1050 firstItem->setSelectable(false); 1051 firstItem->setSelectable(false);
1051 } 1052 }
OLDNEW
« no previous file with comments | « no previous file | tools/PictureBenchmark.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698