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

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

Issue 138013009: Culling API (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Updated per comments. 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 | include/core/SkCanvas.h » ('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 975 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 void SkDebuggerGUI::setupListWidget(SkTArray<SkString>* command) { 986 void SkDebuggerGUI::setupListWidget(SkTArray<SkString>* command) {
987 fListWidget.clear(); 987 fListWidget.clear();
988 int counter = 0; 988 int counter = 0;
989 int indent = 0; 989 int indent = 0;
990 for (int i = 0; i < command->count(); i++) { 990 for (int i = 0; i < command->count(); i++) {
991 QListWidgetItem *item = new QListWidgetItem(); 991 QListWidgetItem *item = new QListWidgetItem();
992 item->setData(Qt::DisplayRole, (*command)[i].c_str()); 992 item->setData(Qt::DisplayRole, (*command)[i].c_str());
993 item->setData(Qt::UserRole + 1, counter++); 993 item->setData(Qt::UserRole + 1, counter++);
994 994
995 if (0 == strcmp("Restore", (*command)[i].c_str()) || 995 if (0 == strcmp("Restore", (*command)[i].c_str()) ||
996 0 == strcmp("EndCommentGroup", (*command)[i].c_str())) { 996 0 == strcmp("EndCommentGroup", (*command)[i].c_str()) ||
997 0 == strcmp("PopCull", (*command)[i].c_str())) {
997 indent -= 10; 998 indent -= 10;
998 } 999 }
999 1000
1000 item->setData(Qt::UserRole + 3, indent); 1001 item->setData(Qt::UserRole + 3, indent);
1001 1002
1002 if (0 == strcmp("Save", (*command)[i].c_str()) || 1003 if (0 == strcmp("Save", (*command)[i].c_str()) ||
1003 0 == strcmp("Save Layer", (*command)[i].c_str()) || 1004 0 == strcmp("Save Layer", (*command)[i].c_str()) ||
1004 0 == strcmp("BeginCommentGroup", (*command)[i].c_str())) { 1005 0 == strcmp("BeginCommentGroup", (*command)[i].c_str()) ||
1006 0 == strcmp("PushCull", (*command)[i].c_str())) {
1005 indent += 10; 1007 indent += 10;
1006 } 1008 }
1007 1009
1008 item->setData(Qt::UserRole + 4, -1.0); 1010 item->setData(Qt::UserRole + 4, -1.0);
1009 1011
1010 fListWidget.addItem(item); 1012 fListWidget.addItem(item);
1011 } 1013 }
1012 } 1014 }
1013 1015
1014 void SkDebuggerGUI::setupOverviewText(const SkTDArray<double>* typeTimes, 1016 void SkDebuggerGUI::setupOverviewText(const SkTDArray<double>* typeTimes,
(...skipping 19 matching lines...) Expand all
1034 } 1036 }
1035 1037
1036 // NOTE(chudy): Makes first item unselectable. 1038 // NOTE(chudy): Makes first item unselectable.
1037 QStandardItemModel* model = qobject_cast<QStandardItemModel*>( 1039 QStandardItemModel* model = qobject_cast<QStandardItemModel*>(
1038 fFilter.model()); 1040 fFilter.model());
1039 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(), 1041 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(),
1040 fFilter.rootModelIndex()); 1042 fFilter.rootModelIndex());
1041 QStandardItem* firstItem = model->itemFromIndex(firstIndex); 1043 QStandardItem* firstItem = model->itemFromIndex(firstIndex);
1042 firstItem->setSelectable(false); 1044 firstItem->setSelectable(false);
1043 } 1045 }
OLDNEW
« no previous file with comments | « no previous file | include/core/SkCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698