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

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

Issue 794263002: Cull pushCull and popCull from Skia. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix debugger Created 6 years 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
« 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 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 SkASSERT(commands->count() == offsets->count()); 805 SkASSERT(commands->count() == offsets->count());
806 fListWidget.clear(); 806 fListWidget.clear();
807 int counter = 0; 807 int counter = 0;
808 int indent = 0; 808 int indent = 0;
809 for (int i = 0; i < commands->count(); i++) { 809 for (int i = 0; i < commands->count(); i++) {
810 QListWidgetItem *item = new QListWidgetItem(); 810 QListWidgetItem *item = new QListWidgetItem();
811 item->setData(Qt::DisplayRole, (*commands)[i].c_str()); 811 item->setData(Qt::DisplayRole, (*commands)[i].c_str());
812 item->setData(Qt::UserRole + 1, counter++); 812 item->setData(Qt::UserRole + 1, counter++);
813 813
814 if (0 == strcmp("Restore", (*commands)[i].c_str()) || 814 if (0 == strcmp("Restore", (*commands)[i].c_str()) ||
815 0 == strcmp("EndCommentGroup", (*commands)[i].c_str()) || 815 0 == strcmp("EndCommentGroup", (*commands)[i].c_str())) {
816 0 == strcmp("PopCull", (*commands)[i].c_str())) {
817 indent -= 10; 816 indent -= 10;
818 } 817 }
819 818
820 item->setData(Qt::UserRole + 3, indent); 819 item->setData(Qt::UserRole + 3, indent);
821 820
822 if (0 == strcmp("Save", (*commands)[i].c_str()) || 821 if (0 == strcmp("Save", (*commands)[i].c_str()) ||
823 0 == strcmp("Save Layer", (*commands)[i].c_str()) || 822 0 == strcmp("Save Layer", (*commands)[i].c_str()) ||
824 0 == strcmp("BeginCommentGroup", (*commands)[i].c_str()) || 823 0 == strcmp("BeginCommentGroup", (*commands)[i].c_str())) {
825 0 == strcmp("PushCull", (*commands)[i].c_str())) {
826 indent += 10; 824 indent += 10;
827 } 825 }
828 826
829 item->setData(Qt::UserRole + 4, -1); 827 item->setData(Qt::UserRole + 4, -1);
830 item->setData(Qt::UserRole + 5, (int)(*offsets)[i]); 828 item->setData(Qt::UserRole + 5, (int)(*offsets)[i]);
831 829
832 fListWidget.addItem(item); 830 fListWidget.addItem(item);
833 } 831 }
834 } 832 }
835 833
(...skipping 26 matching lines...) Expand all
862 } 860 }
863 861
864 // NOTE(chudy): Makes first item unselectable. 862 // NOTE(chudy): Makes first item unselectable.
865 QStandardItemModel* model = qobject_cast<QStandardItemModel*>( 863 QStandardItemModel* model = qobject_cast<QStandardItemModel*>(
866 fFilter.model()); 864 fFilter.model());
867 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(), 865 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(),
868 fFilter.rootModelIndex()); 866 fFilter.rootModelIndex());
869 QStandardItem* firstItem = model->itemFromIndex(firstIndex); 867 QStandardItem* firstItem = model->itemFromIndex(firstIndex);
870 firstItem->setSelectable(false); 868 firstItem->setSelectable(false);
871 } 869 }
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