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

Side by Side Diff: samplecode/SampleAll.cpp

Issue 238273012: Staged removal of SkPicture-derived classes (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: have SkPicture only friend SkPictureRecorder once Created 6 years, 8 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 | « include/core/SkTileGridPicture.h ('k') | samplecode/SampleApp.cpp » ('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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } 301 }
302 302
303 virtual void onDrawContent(SkCanvas* canvas) { 303 virtual void onDrawContent(SkCanvas* canvas) {
304 canvas->save(); 304 canvas->save();
305 this->drawPicture(canvas, 0); 305 this->drawPicture(canvas, 0);
306 canvas->restore(); 306 canvas->restore();
307 307
308 { 308 {
309 SkPictureRecorder recorder; 309 SkPictureRecorder recorder;
310 { 310 {
311 SkCanvas* record = recorder.beginRecording(320, 480); 311 SkCanvas* record = recorder.beginRecording(320, 480, NULL, 0);
312 this->drawPicture(record, 120); 312 this->drawPicture(record, 120);
313 } 313 }
314 SkAutoTUnref<SkPicture> picture(recorder.endRecording()); 314 SkAutoTUnref<SkPicture> picture(recorder.endRecording());
315 315
316 canvas->translate(0, SkIntToScalar(120)); 316 canvas->translate(0, SkIntToScalar(120));
317 317
318 SkRect clip; 318 SkRect clip;
319 clip.set(0, 0, SkIntToScalar(160), SkIntToScalar(160)); 319 clip.set(0, 0, SkIntToScalar(160), SkIntToScalar(160));
320 do { 320 do {
321 canvas->save(); 321 canvas->save();
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 private: 646 private:
647 SkPoint fClickPt; 647 SkPoint fClickPt;
648 SkBitmap fBug, fTb, fTx; 648 SkBitmap fBug, fTb, fTx;
649 typedef SampleView INHERITED; 649 typedef SampleView INHERITED;
650 }; 650 };
651 651
652 ////////////////////////////////////////////////////////////////////////////// 652 //////////////////////////////////////////////////////////////////////////////
653 653
654 static SkView* MyFactory() { return new DemoView; } 654 static SkView* MyFactory() { return new DemoView; }
655 static SkViewRegister reg(MyFactory); 655 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « include/core/SkTileGridPicture.h ('k') | samplecode/SampleApp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698