| 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 "SkSurface_Base.h" | 8 #include "SkSurface_Base.h" |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkImagePriv.h" | 10 #include "SkImagePriv.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 virtual SkCanvas* onNewCanvas() SK_OVERRIDE; | 22 virtual SkCanvas* onNewCanvas() SK_OVERRIDE; |
| 23 virtual SkSurface* onNewSurface(const SkImage::Info&) SK_OVERRIDE; | 23 virtual SkSurface* onNewSurface(const SkImage::Info&) SK_OVERRIDE; |
| 24 virtual SkImage* onNewImageShapshot() SK_OVERRIDE; | 24 virtual SkImage* onNewImageShapshot() SK_OVERRIDE; |
| 25 virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, | 25 virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, |
| 26 const SkPaint*) SK_OVERRIDE; | 26 const SkPaint*) SK_OVERRIDE; |
| 27 virtual void onCopyOnWrite(SkImage*, SkCanvas*) SK_OVERRIDE; | 27 virtual void onCopyOnWrite(SkImage*, SkCanvas*) SK_OVERRIDE; |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 SkPicture* fPicture; | 30 SkPicture* fPicture; |
| 31 SkPicture* fRecordingPicture; | |
| 32 | 31 |
| 33 typedef SkSurface_Base INHERITED; | 32 typedef SkSurface_Base INHERITED; |
| 34 }; | 33 }; |
| 35 | 34 |
| 36 /////////////////////////////////////////////////////////////////////////////// | 35 /////////////////////////////////////////////////////////////////////////////// |
| 37 | 36 |
| 38 SkSurface_Picture::SkSurface_Picture(int width, int height) : INHERITED(width, h
eight) { | 37 SkSurface_Picture::SkSurface_Picture(int width, int height) : INHERITED(width, h
eight) { |
| 39 fPicture = NULL; | 38 fPicture = NULL; |
| 40 } | 39 } |
| 41 | 40 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 /////////////////////////////////////////////////////////////////////////////// | 83 /////////////////////////////////////////////////////////////////////////////// |
| 85 | 84 |
| 86 | 85 |
| 87 SkSurface* SkSurface::NewPicture(int width, int height) { | 86 SkSurface* SkSurface::NewPicture(int width, int height) { |
| 88 if ((width | height) < 0) { | 87 if ((width | height) < 0) { |
| 89 return NULL; | 88 return NULL; |
| 90 } | 89 } |
| 91 | 90 |
| 92 return SkNEW_ARGS(SkSurface_Picture, (width, height)); | 91 return SkNEW_ARGS(SkSurface_Picture, (width, height)); |
| 93 } | 92 } |
| OLD | NEW |