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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 typedef SkPicturePlayback INHERITED; | 255 typedef SkPicturePlayback INHERITED; |
256 }; | 256 }; |
257 | 257 |
258 // Wrap SkPicture to allow installation of an SkTimedPicturePlayback object | 258 // Wrap SkPicture to allow installation of an SkTimedPicturePlayback object |
259 class SkTimedPicture : public SkPicture { | 259 class SkTimedPicture : public SkPicture { |
260 public: | 260 public: |
261 static SkTimedPicture* CreateTimedPicture(SkStream* stream, | 261 static SkTimedPicture* CreateTimedPicture(SkStream* stream, |
262 SkPicture::InstallPixelRefProc pro
c, | 262 SkPicture::InstallPixelRefProc pro
c, |
263 const SkTDArray<bool>& deletedComm
ands) { | 263 const SkTDArray<bool>& deletedComm
ands) { |
264 SkPictInfo info; | 264 SkPictInfo info; |
265 if (!StreamIsSKP(stream, &info)) { | 265 if (!InternalOnly_StreamIsSKP(stream, &info)) { |
266 return NULL; | 266 return NULL; |
267 } | 267 } |
268 | 268 |
269 SkTimedPicturePlayback* playback; | 269 SkTimedPicturePlayback* playback; |
270 // Check to see if there is a playback to recreate. | 270 // Check to see if there is a playback to recreate. |
271 if (stream->readBool()) { | 271 if (stream->readBool()) { |
272 playback = SkTimedPicturePlayback::CreateFromStream(stream, info, pr
oc, | 272 playback = SkTimedPicturePlayback::CreateFromStream(stream, info, pr
oc, |
273 deletedCommands)
; | 273 deletedCommands)
; |
274 if (NULL == playback) { | 274 if (NULL == playback) { |
275 return NULL; | 275 return NULL; |
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1042 } | 1042 } |
1043 | 1043 |
1044 // NOTE(chudy): Makes first item unselectable. | 1044 // NOTE(chudy): Makes first item unselectable. |
1045 QStandardItemModel* model = qobject_cast<QStandardItemModel*>( | 1045 QStandardItemModel* model = qobject_cast<QStandardItemModel*>( |
1046 fFilter.model()); | 1046 fFilter.model()); |
1047 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(), | 1047 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(), |
1048 fFilter.rootModelIndex()); | 1048 fFilter.rootModelIndex()); |
1049 QStandardItem* firstItem = model->itemFromIndex(firstIndex); | 1049 QStandardItem* firstItem = model->itemFromIndex(firstIndex); |
1050 firstItem->setSelectable(false); | 1050 firstItem->setSelectable(false); |
1051 } | 1051 } |
OLD | NEW |