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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 SkReader32 reader(fPictureData->opData()->bytes(), fPictureData->opData(
)->size()); | 179 SkReader32 reader(fPictureData->opData()->bytes(), fPictureData->opData(
)->size()); |
180 | 180 |
181 // Record this, so we can concat w/ it if we encounter a setMatrix() | 181 // Record this, so we can concat w/ it if we encounter a setMatrix() |
182 SkMatrix initialMatrix = canvas->getTotalMatrix(); | 182 SkMatrix initialMatrix = canvas->getTotalMatrix(); |
183 | 183 |
184 SkAutoCanvasRestore acr(canvas, false); | 184 SkAutoCanvasRestore acr(canvas, false); |
185 | 185 |
186 int opIndex = -1; | 186 int opIndex = -1; |
187 | 187 |
188 while (!reader.eof()) { | 188 while (!reader.eof()) { |
189 if (NULL != callback && callback->abortDrawing()) { | 189 if (callback && callback->abortDrawing()) { |
190 return; | 190 return; |
191 } | 191 } |
192 | 192 |
193 fCurOffset = reader.offset(); | 193 fCurOffset = reader.offset(); |
194 uint32_t size; | 194 uint32_t size; |
195 DrawType op = ReadOpAndSize(&reader, &size); | 195 DrawType op = ReadOpAndSize(&reader, &size); |
196 if (NOOP == op) { | 196 if (NOOP == op) { |
197 // NOOPs are to be ignored - do not propagate them any further | 197 // NOOPs are to be ignored - do not propagate them any further |
198 reader.setOffset(fCurOffset + size); | 198 reader.setOffset(fCurOffset + size); |
199 continue; | 199 continue; |
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1108 } | 1108 } |
1109 | 1109 |
1110 // NOTE(chudy): Makes first item unselectable. | 1110 // NOTE(chudy): Makes first item unselectable. |
1111 QStandardItemModel* model = qobject_cast<QStandardItemModel*>( | 1111 QStandardItemModel* model = qobject_cast<QStandardItemModel*>( |
1112 fFilter.model()); | 1112 fFilter.model()); |
1113 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(), | 1113 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(), |
1114 fFilter.rootModelIndex()); | 1114 fFilter.rootModelIndex()); |
1115 QStandardItem* firstItem = model->itemFromIndex(firstIndex); | 1115 QStandardItem* firstItem = model->itemFromIndex(firstIndex); |
1116 firstItem->setSelectable(false); | 1116 firstItem->setSelectable(false); |
1117 } | 1117 } |
OLD | NEW |