| 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 #ifndef SkSurface_DEFINED |    8 #ifndef SkSurface_DEFINED | 
|    9 #define SkSurface_DEFINED |    9 #define SkSurface_DEFINED | 
|   10  |   10  | 
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  146      *  Thought the caller could get a snapshot image explicitly, and draw that, |  146      *  Thought the caller could get a snapshot image explicitly, and draw that, | 
|  147      *  it seems that directly drawing a surface into another canvas might be |  147      *  it seems that directly drawing a surface into another canvas might be | 
|  148      *  a common pattern, and that we could possibly be more efficient, since |  148      *  a common pattern, and that we could possibly be more efficient, since | 
|  149      *  we'd know that the "snapshot" need only live until we've handed it off |  149      *  we'd know that the "snapshot" need only live until we've handed it off | 
|  150      *  to the canvas. |  150      *  to the canvas. | 
|  151      */ |  151      */ | 
|  152     void draw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*); |  152     void draw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*); | 
|  153  |  153  | 
|  154 protected: |  154 protected: | 
|  155     SkSurface(int width, int height); |  155     SkSurface(int width, int height); | 
 |  156     SkSurface(const SkImageInfo&); | 
|  156  |  157  | 
|  157     // called by subclass if their contents have changed |  158     // called by subclass if their contents have changed | 
|  158     void dirtyGenerationID() { |  159     void dirtyGenerationID() { | 
|  159         fGenerationID = 0; |  160         fGenerationID = 0; | 
|  160     } |  161     } | 
|  161  |  162  | 
|  162 private: |  163 private: | 
|  163     const int   fWidth; |  164     const int   fWidth; | 
|  164     const int   fHeight; |  165     const int   fHeight; | 
|  165     uint32_t    fGenerationID; |  166     uint32_t    fGenerationID; | 
|  166  |  167  | 
|  167     typedef SkRefCnt INHERITED; |  168     typedef SkRefCnt INHERITED; | 
|  168 }; |  169 }; | 
|  169  |  170  | 
|  170 #endif |  171 #endif | 
| OLD | NEW |