| OLD | NEW |
| 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 Loading... |
| 316 return; | 316 return; |
| 317 } | 317 } |
| 318 | 318 |
| 319 SkASSERT(renderer != NULL); | 319 SkASSERT(renderer != NULL); |
| 320 if (NULL == renderer) { | 320 if (NULL == renderer) { |
| 321 return; | 321 return; |
| 322 } | 322 } |
| 323 | 323 |
| 324 renderer->init(pict, NULL, NULL, false); | 324 renderer->init(pict, NULL, NULL, false); |
| 325 | 325 |
| 326 renderer->setup(); | 326 renderer->setup1(); |
| 327 renderer->render(); | 327 renderer->render(); |
| 328 renderer->resetState(true); // flush, swapBuffers and Finish | 328 renderer->resetState(true); // flush, swapBuffers and Finish |
| 329 | 329 |
| 330 // We throw this away the first batch of times to remove first time effects
(such as paging in this program) | 330 // We throw this away the first batch of times to remove first time effects
(such as paging in this program) |
| 331 pict->resetTimes(); | 331 pict->resetTimes(); |
| 332 | 332 |
| 333 for (int i = 0; i < repeats; ++i) { | 333 for (int i = 0; i < repeats; ++i) { |
| 334 renderer->setup(); | 334 renderer->setup1(); |
| 335 renderer->render(); | 335 renderer->render(); |
| 336 renderer->resetState(false); // flush & swapBuffers, but don't Finish | 336 renderer->resetState(false); // flush & swapBuffers, but don't Finish |
| 337 } | 337 } |
| 338 renderer->resetState(true); // flush, swapBuffers and Finish | 338 renderer->resetState(true); // flush, swapBuffers and Finish |
| 339 | 339 |
| 340 renderer->end(); | 340 renderer->end(); |
| 341 } | 341 } |
| 342 | 342 |
| 343 void SkDebuggerGUI::actionProfile() { | 343 void SkDebuggerGUI::actionProfile() { |
| 344 // In order to profile we pass the command offsets (that were read-in | 344 // In order to profile we pass the command offsets (that were read-in |
| (...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1053 } | 1053 } |
| 1054 | 1054 |
| 1055 // NOTE(chudy): Makes first item unselectable. | 1055 // NOTE(chudy): Makes first item unselectable. |
| 1056 QStandardItemModel* model = qobject_cast<QStandardItemModel*>( | 1056 QStandardItemModel* model = qobject_cast<QStandardItemModel*>( |
| 1057 fFilter.model()); | 1057 fFilter.model()); |
| 1058 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(), | 1058 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(), |
| 1059 fFilter.rootModelIndex()); | 1059 fFilter.rootModelIndex()); |
| 1060 QStandardItem* firstItem = model->itemFromIndex(firstIndex); | 1060 QStandardItem* firstItem = model->itemFromIndex(firstIndex); |
| 1061 firstItem->setSelectable(false); | 1061 firstItem->setSelectable(false); |
| 1062 } | 1062 } |
| OLD | NEW |