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

Side by Side Diff: samplecode/SampleTiling.cpp

Issue 313613004: Alter SkCanvas::drawPicture (devirtualize, take const SkPicture, take pointer) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add staging entry point for Chromium and Android 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
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 "SkView.h" 9 #include "SkView.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 y += r.height() * 4 / 3; 151 y += r.height() * 4 / 3;
152 } 152 }
153 } 153 }
154 154
155 if (NULL != textCanvas) { 155 if (NULL != textCanvas) {
156 SkASSERT(NULL == fTextPicture); 156 SkASSERT(NULL == fTextPicture);
157 fTextPicture.reset(recorder.endRecording()); 157 fTextPicture.reset(recorder.endRecording());
158 } 158 }
159 159
160 SkASSERT(NULL != fTextPicture); 160 SkASSERT(NULL != fTextPicture);
161 canvas->drawPicture(*fTextPicture); 161 canvas->drawPicture(fTextPicture);
162 } 162 }
163 163
164 private: 164 private:
165 typedef SampleView INHERITED; 165 typedef SampleView INHERITED;
166 }; 166 };
167 167
168 ////////////////////////////////////////////////////////////////////////////// 168 //////////////////////////////////////////////////////////////////////////////
169 169
170 static SkView* MyFactory() { return new TilingView; } 170 static SkView* MyFactory() { return new TilingView; }
171 static SkViewRegister reg(MyFactory); 171 static SkViewRegister reg(MyFactory);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698