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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 SkASSERT(pict); | 312 SkASSERT(pict); |
313 if (NULL == pict) { | 313 if (NULL == pict) { |
314 return; | 314 return; |
315 } | 315 } |
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, NULL, NULL, false); |
323 | 323 |
324 renderer->setup(); | 324 renderer->setup(); |
325 renderer->render(NULL); | 325 renderer->render(); |
326 renderer->resetState(true); // flush, swapBuffers and Finish | 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(); |
334 renderer->resetState(false); // flush & swapBuffers, but don't Finish | 334 renderer->resetState(false); // flush & swapBuffers, but don't Finish |
335 } | 335 } |
336 renderer->resetState(true); // flush, swapBuffers and Finish | 336 renderer->resetState(true); // flush, swapBuffers and Finish |
337 | 337 |
338 renderer->end(); | 338 renderer->end(); |
339 } | 339 } |
340 | 340 |
341 void SkDebuggerGUI::actionProfile() { | 341 void SkDebuggerGUI::actionProfile() { |
342 // 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 |
343 // in loadPicture by the SkOffsetPicture) to an SkTimedPlaybackPicture. | 343 // in loadPicture by the SkOffsetPicture) to an SkTimedPlaybackPicture. |
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1043 } | 1043 } |
1044 | 1044 |
1045 // NOTE(chudy): Makes first item unselectable. | 1045 // NOTE(chudy): Makes first item unselectable. |
1046 QStandardItemModel* model = qobject_cast<QStandardItemModel*>( | 1046 QStandardItemModel* model = qobject_cast<QStandardItemModel*>( |
1047 fFilter.model()); | 1047 fFilter.model()); |
1048 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(), | 1048 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(), |
1049 fFilter.rootModelIndex()); | 1049 fFilter.rootModelIndex()); |
1050 QStandardItem* firstItem = model->itemFromIndex(firstIndex); | 1050 QStandardItem* firstItem = model->itemFromIndex(firstIndex); |
1051 firstItem->setSelectable(false); | 1051 firstItem->setSelectable(false); |
1052 } | 1052 } |
OLD | NEW |