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

Side by Side Diff: src/core/SkPicture.cpp

Issue 18655008: Revert "Temporary change to keep chrome happy." (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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/SkPicture.h ('k') | no next file » | 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 2007 The Android Open Source Project 3 * Copyright 2007 The Android Open Source Project
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 8
9 9
10 #include "SkPictureFlat.h" 10 #include "SkPictureFlat.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 if (PICTURE_VERSION != info.fVersion) { 276 if (PICTURE_VERSION != info.fVersion) {
277 return false; 277 return false;
278 } 278 }
279 279
280 if (pInfo != NULL) { 280 if (pInfo != NULL) {
281 *pInfo = info; 281 *pInfo = info;
282 } 282 }
283 return true; 283 return true;
284 } 284 }
285 285
286 SkPicture::SkPicture(SkStream* stream, bool* success, InstallPixelRefProc proc) {
287 fRecord = NULL;
288 SkAutoTUnref<SkPicture> picture(CreateFromStream(stream, proc));
289 if (NULL == picture.get()) {
290 fPlayback = NULL;
291 fWidth = fHeight = 0;
292 if (success) {
293 *success = false;
294 }
295 } else {
296 fPlayback = picture->fPlayback;
297 picture->fPlayback = NULL;
298 fWidth = picture->fWidth;
299 fHeight = picture->fHeight;
300 if (success) {
301 *success = true;
302 }
303 }
304 }
305
306 SkPicture::SkPicture(SkPicturePlayback* playback, int width, int height) 286 SkPicture::SkPicture(SkPicturePlayback* playback, int width, int height)
307 : fPlayback(playback) 287 : fPlayback(playback)
308 , fRecord(NULL) 288 , fRecord(NULL)
309 , fWidth(width) 289 , fWidth(width)
310 , fHeight(height) {} 290 , fHeight(height) {}
311 291
312 SkPicture* SkPicture::CreateFromStream(SkStream* stream, InstallPixelRefProc pro c) { 292 SkPicture* SkPicture::CreateFromStream(SkStream* stream, InstallPixelRefProc pro c) {
313 SkPictInfo info; 293 SkPictInfo info;
314 294
315 if (!StreamIsSKP(stream, &info)) { 295 if (!StreamIsSKP(stream, &info)) {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 } 341 }
362 342
363 #ifdef SK_BUILD_FOR_ANDROID 343 #ifdef SK_BUILD_FOR_ANDROID
364 void SkPicture::abortPlayback() { 344 void SkPicture::abortPlayback() {
365 if (NULL == fPlayback) { 345 if (NULL == fPlayback) {
366 return; 346 return;
367 } 347 }
368 fPlayback->abort(); 348 fPlayback->abort();
369 } 349 }
370 #endif 350 #endif
OLDNEW
« no previous file with comments | « include/core/SkPicture.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698