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

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

Issue 163603003: add peekPixels to SkCanvas and SkSurface (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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/SkBitmap.h ('k') | include/core/SkCanvas.h » ('j') | 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 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 /** Returns true if the device's bitmap's config treats every pixels as 76 /** Returns true if the device's bitmap's config treats every pixels as
77 implicitly opaque. 77 implicitly opaque.
78 */ 78 */
79 virtual bool isOpaque() const SK_OVERRIDE { return fBitmap.isOpaque(); } 79 virtual bool isOpaque() const SK_OVERRIDE { return fBitmap.isOpaque(); }
80 80
81 /** Return the bitmap config of the device's pixels 81 /** Return the bitmap config of the device's pixels
82 */ 82 */
83 virtual SkBitmap::Config config() const SK_OVERRIDE { return fBitmap.config( ); } 83 virtual SkBitmap::Config config() const SK_OVERRIDE { return fBitmap.config( ); }
84 84
85 virtual SkImageInfo imageInfo() const SK_OVERRIDE;
86
85 /** 87 /**
86 * DEPRECATED: This will be made protected once WebKit stops using it. 88 * DEPRECATED: This will be made protected once WebKit stops using it.
87 * Instead use Canvas' writePixels method. 89 * Instead use Canvas' writePixels method.
88 * 90 *
89 * Similar to draw sprite, this method will copy the pixels in bitmap onto 91 * Similar to draw sprite, this method will copy the pixels in bitmap onto
90 * the device, with the top/left corner specified by (x, y). The pixel 92 * the device, with the top/left corner specified by (x, y). The pixel
91 * values in the device are completely replaced: there is no blending. 93 * values in the device are completely replaced: there is no blending.
92 * 94 *
93 * Currently if bitmap is backed by a texture this is a no-op. This may be 95 * Currently if bitmap is backed by a texture this is a no-op. This may be
94 * relaxed in the future. 96 * relaxed in the future.
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 virtual SkBaseDevice* onCreateCompatibleDevice(SkBitmap::Config config, 273 virtual SkBaseDevice* onCreateCompatibleDevice(SkBitmap::Config config,
272 int width, int height, 274 int width, int height,
273 bool isOpaque, 275 bool isOpaque,
274 Usage usage) SK_OVERRIDE; 276 Usage usage) SK_OVERRIDE;
275 277
276 /** Causes any deferred drawing to the device to be completed. 278 /** Causes any deferred drawing to the device to be completed.
277 */ 279 */
278 virtual void flush() SK_OVERRIDE {} 280 virtual void flush() SK_OVERRIDE {}
279 281
280 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE; 282 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE;
283 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes) SK_OVERRIDE;
281 284
282 SkBitmap fBitmap; 285 SkBitmap fBitmap;
283 286
284 typedef SkBaseDevice INHERITED; 287 typedef SkBaseDevice INHERITED;
285 }; 288 };
286 289
287 #endif // SkBitmapDevice_DEFINED 290 #endif // SkBitmapDevice_DEFINED
OLDNEW
« no previous file with comments | « include/core/SkBitmap.h ('k') | include/core/SkCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698