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

Side by Side Diff: include/core/SkBitmapDevice.h

Issue 988413003: Change device creation to see the (optional) layer-paint (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address comments Created 5 years, 9 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
« no previous file with comments | « no previous file | include/core/SkCanvas.h » ('j') | src/core/SkCanvas.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 virtual void drawText(const SkDraw&, const void* text, size_t len, 91 virtual void drawText(const SkDraw&, const void* text, size_t len,
92 SkScalar x, SkScalar y, const SkPaint& paint) SK_OVERR IDE; 92 SkScalar x, SkScalar y, const SkPaint& paint) SK_OVERR IDE;
93 virtual void drawPosText(const SkDraw&, const void* text, size_t len, 93 virtual void drawPosText(const SkDraw&, const void* text, size_t len,
94 const SkScalar pos[], int scalarsPerPos, 94 const SkScalar pos[], int scalarsPerPos,
95 const SkPoint& offset, const SkPaint& paint) SK_OVE RRIDE; 95 const SkPoint& offset, const SkPaint& paint) SK_OVE RRIDE;
96 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou nt, 96 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou nt,
97 const SkPoint verts[], const SkPoint texs[], 97 const SkPoint verts[], const SkPoint texs[],
98 const SkColor colors[], SkXfermode* xmode, 98 const SkColor colors[], SkXfermode* xmode,
99 const uint16_t indices[], int indexCount, 99 const uint16_t indices[], int indexCount,
100 const SkPaint& paint) SK_OVERRIDE; 100 const SkPaint& paint) SK_OVERRIDE;
101 /** The SkBaseDevice passed will be an SkBaseDevice which was returned by a call to 101 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, const Sk Paint&) SK_OVERRIDE;
102 onCreateCompatibleDevice on this device with kSaveLayer_Usage.
103 */
104 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y,
105 const SkPaint&) SK_OVERRIDE;
106 102
107 /////////////////////////////////////////////////////////////////////////// 103 ///////////////////////////////////////////////////////////////////////////
108 104
109 /** Update as needed the pixel value in the bitmap, so that the caller can 105 /** Update as needed the pixel value in the bitmap, so that the caller can
110 access the pixels directly. Note: only the pixels field should be 106 access the pixels directly. Note: only the pixels field should be
111 altered. The config/width/height/rowbytes must remain unchanged. 107 altered. The config/width/height/rowbytes must remain unchanged.
112 @return the device contents as a bitmap 108 @return the device contents as a bitmap
113 */ 109 */
114 const SkBitmap& onAccessBitmap() SK_OVERRIDE; 110 const SkBitmap& onAccessBitmap() SK_OVERRIDE;
115 111
(...skipping 22 matching lines...) Expand all
138 friend class SkDeviceFilteredPaint; 134 friend class SkDeviceFilteredPaint;
139 friend class SkDeviceImageFilterProxy; 135 friend class SkDeviceImageFilterProxy;
140 136
141 friend class SkSurface_Raster; 137 friend class SkSurface_Raster;
142 138
143 // used to change the backend's pixels (and possibly config/rowbytes) 139 // used to change the backend's pixels (and possibly config/rowbytes)
144 // but cannot change the width/height, so there should be no change to 140 // but cannot change the width/height, so there should be no change to
145 // any clip information. 141 // any clip information.
146 void replaceBitmapBackendForRasterSurface(const SkBitmap&) SK_OVERRIDE; 142 void replaceBitmapBackendForRasterSurface(const SkBitmap&) SK_OVERRIDE;
147 143
148 SkBaseDevice* onCreateCompatibleDevice(const CreateInfo&) SK_OVERRIDE; 144 SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) SK_OVERRIDE;
149 145
150 SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) SK_OVERRIDE ; 146 SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) SK_OVERRIDE ;
151 const void* peekPixels(SkImageInfo*, size_t* rowBytes) SK_OVERRIDE; 147 const void* peekPixels(SkImageInfo*, size_t* rowBytes) SK_OVERRIDE;
152 148
153 SkImageFilter::Cache* getImageFilterCache() SK_OVERRIDE; 149 SkImageFilter::Cache* getImageFilterCache() SK_OVERRIDE;
154 150
155 SkBitmap fBitmap; 151 SkBitmap fBitmap;
156 152
157 typedef SkBaseDevice INHERITED; 153 typedef SkBaseDevice INHERITED;
158 }; 154 };
159 155
160 #endif // SkBitmapDevice_DEFINED 156 #endif // SkBitmapDevice_DEFINED
OLDNEW
« no previous file with comments | « no previous file | include/core/SkCanvas.h » ('j') | src/core/SkCanvas.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698