OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 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 | 8 |
9 #ifndef SkBitmapDevice_DEFINED | 9 #ifndef SkBitmapDevice_DEFINED |
10 #define SkBitmapDevice_DEFINED | 10 #define SkBitmapDevice_DEFINED |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 const SkPoint& offset, const SkPaint& paint) SK_OVE
RRIDE; | 100 const SkPoint& offset, const SkPaint& paint) SK_OVE
RRIDE; |
101 virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, | 101 virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, |
102 const SkPath& path, const SkMatrix* matrix, | 102 const SkPath& path, const SkMatrix* matrix, |
103 const SkPaint& paint) SK_OVERRIDE; | 103 const SkPaint& paint) SK_OVERRIDE; |
104 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou
nt, | 104 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou
nt, |
105 const SkPoint verts[], const SkPoint texs[], | 105 const SkPoint verts[], const SkPoint texs[], |
106 const SkColor colors[], SkXfermode* xmode, | 106 const SkColor colors[], SkXfermode* xmode, |
107 const uint16_t indices[], int indexCount, | 107 const uint16_t indices[], int indexCount, |
108 const SkPaint& paint) SK_OVERRIDE; | 108 const SkPaint& paint) SK_OVERRIDE; |
109 /** The SkBaseDevice passed will be an SkBaseDevice which was returned by a
call to | 109 /** The SkBaseDevice passed will be an SkBaseDevice which was returned by a
call to |
110 onCreateDevice on this device with kSaveLayer_Usage. | 110 onCreateCompatibleDevice on this device with kSaveLayer_Usage. |
111 */ | 111 */ |
112 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, | 112 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, |
113 const SkPaint&) SK_OVERRIDE; | 113 const SkPaint&) SK_OVERRIDE; |
114 | 114 |
115 /////////////////////////////////////////////////////////////////////////// | 115 /////////////////////////////////////////////////////////////////////////// |
116 | 116 |
117 /** Update as needed the pixel value in the bitmap, so that the caller can | 117 /** Update as needed the pixel value in the bitmap, so that the caller can |
118 access the pixels directly. Note: only the pixels field should be | 118 access the pixels directly. Note: only the pixels field should be |
119 altered. The config/width/height/rowbytes must remain unchanged. | 119 altered. The config/width/height/rowbytes must remain unchanged. |
120 @return the device contents as a bitmap | 120 @return the device contents as a bitmap |
(...skipping 25 matching lines...) Expand all Loading... |
146 friend class SkDeviceFilteredPaint; | 146 friend class SkDeviceFilteredPaint; |
147 friend class SkDeviceImageFilterProxy; | 147 friend class SkDeviceImageFilterProxy; |
148 | 148 |
149 friend class SkSurface_Raster; | 149 friend class SkSurface_Raster; |
150 | 150 |
151 // used to change the backend's pixels (and possibly config/rowbytes) | 151 // used to change the backend's pixels (and possibly config/rowbytes) |
152 // but cannot change the width/height, so there should be no change to | 152 // but cannot change the width/height, so there should be no change to |
153 // any clip information. | 153 // any clip information. |
154 virtual void replaceBitmapBackendForRasterSurface(const SkBitmap&) SK_OVERRI
DE; | 154 virtual void replaceBitmapBackendForRasterSurface(const SkBitmap&) SK_OVERRI
DE; |
155 | 155 |
156 virtual SkBaseDevice* onCreateDevice(const SkImageInfo&, Usage) SK_OVERRIDE; | 156 virtual SkBaseDevice* onCreateCompatibleDevice(const CreateInfo&) SK_OVERRID
E; |
157 | 157 |
158 virtual SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) SK_
OVERRIDE; | 158 virtual SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) SK_
OVERRIDE; |
159 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes) SK_OVERRIDE; | 159 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes) SK_OVERRIDE; |
160 | 160 |
161 virtual SkImageFilter::Cache* getImageFilterCache() SK_OVERRIDE; | 161 virtual SkImageFilter::Cache* getImageFilterCache() SK_OVERRIDE; |
162 | 162 |
163 SkBitmap fBitmap; | 163 SkBitmap fBitmap; |
164 | 164 |
165 typedef SkBaseDevice INHERITED; | 165 typedef SkBaseDevice INHERITED; |
166 }; | 166 }; |
167 | 167 |
168 #endif // SkBitmapDevice_DEFINED | 168 #endif // SkBitmapDevice_DEFINED |
OLD | NEW |