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

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

Issue 333823007: Enable basic drawing with SkRecord-based pictures. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: ref accel data Created 6 years, 6 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
« no previous file with comments | « no previous file | include/core/SkPicture.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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 if (NULL == playback) { 279 if (NULL == playback) {
280 return NULL; 280 return NULL;
281 } 281 }
282 282
283 return SkNEW_ARGS(SkTimedPicture, (playback, info.fWidth, info.fHeig ht)); 283 return SkNEW_ARGS(SkTimedPicture, (playback, info.fWidth, info.fHeig ht));
284 } 284 }
285 285
286 return NULL; 286 return NULL;
287 } 287 }
288 288
289 void resetTimes() { ((SkTimedPicturePlayback*) fPlayback)->resetTimes(); } 289 void resetTimes() { ((SkTimedPicturePlayback*) fPlayback.get())->resetTimes( ); }
290 290
291 int count() const { return ((SkTimedPicturePlayback*) fPlayback)->count(); } 291 int count() const { return ((SkTimedPicturePlayback*) fPlayback.get())->coun t(); }
292 292
293 // return the fraction of the total time this command consumed 293 // return the fraction of the total time this command consumed
294 double time(int index) const { return ((SkTimedPicturePlayback*) fPlayback)- >time(index); } 294 double time(int index) const { return ((SkTimedPicturePlayback*) fPlayback.g et())->time(index); }
295 295
296 const SkTDArray<double>* typeTimes() const { return ((SkTimedPicturePlayback *) fPlayback)->typeTimes(); } 296 const SkTDArray<double>* typeTimes() const { return ((SkTimedPicturePlayback *) fPlayback.get())->typeTimes(); }
297 297
298 double totTime() const { return ((SkTimedPicturePlayback*) fPlayback)->totTi me(); } 298 double totTime() const { return ((SkTimedPicturePlayback*) fPlayback.get())- >totTime(); }
299 299
300 private: 300 private:
301 // disallow default ctor b.c. we don't have a good way to setup the fPlaybac k ptr 301 // disallow default ctor b.c. we don't have a good way to setup the fPlaybac k ptr
302 SkTimedPicture(); 302 SkTimedPicture();
303 // Private ctor only used by CreateTimedPicture, which has created the playb ack. 303 // Private ctor only used by CreateTimedPicture, which has created the playb ack.
304 SkTimedPicture(SkTimedPicturePlayback* playback, int width, int height) 304 SkTimedPicture(SkTimedPicturePlayback* playback, int width, int height)
305 : INHERITED(playback, width, height) {} 305 : INHERITED(playback, width, height) {}
306 // disallow the copy ctor - enabling would require copying code from SkPictu re 306 // disallow the copy ctor - enabling would require copying code from SkPictu re
307 SkTimedPicture(const SkTimedPicture& src); 307 SkTimedPicture(const SkTimedPicture& src);
308 308
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 } 1069 }
1070 1070
1071 // NOTE(chudy): Makes first item unselectable. 1071 // NOTE(chudy): Makes first item unselectable.
1072 QStandardItemModel* model = qobject_cast<QStandardItemModel*>( 1072 QStandardItemModel* model = qobject_cast<QStandardItemModel*>(
1073 fFilter.model()); 1073 fFilter.model());
1074 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(), 1074 QModelIndex firstIndex = model->index(0, fFilter.modelColumn(),
1075 fFilter.rootModelIndex()); 1075 fFilter.rootModelIndex());
1076 QStandardItem* firstItem = model->itemFromIndex(firstIndex); 1076 QStandardItem* firstItem = model->itemFromIndex(firstIndex);
1077 firstItem->setSelectable(false); 1077 firstItem->setSelectable(false);
1078 } 1078 }
OLDNEW
« no previous file with comments | « no previous file | include/core/SkPicture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698