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

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

Issue 163823002: Revert of 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
87 /** 85 /**
88 * DEPRECATED: This will be made protected once WebKit stops using it. 86 * DEPRECATED: This will be made protected once WebKit stops using it.
89 * Instead use Canvas' writePixels method. 87 * Instead use Canvas' writePixels method.
90 * 88 *
91 * Similar to draw sprite, this method will copy the pixels in bitmap onto 89 * Similar to draw sprite, this method will copy the pixels in bitmap onto
92 * the device, with the top/left corner specified by (x, y). The pixel 90 * the device, with the top/left corner specified by (x, y). The pixel
93 * values in the device are completely replaced: there is no blending. 91 * values in the device are completely replaced: there is no blending.
94 * 92 *
95 * Currently if bitmap is backed by a texture this is a no-op. This may be 93 * Currently if bitmap is backed by a texture this is a no-op. This may be
96 * relaxed in the future. 94 * relaxed in the future.
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 virtual SkBaseDevice* onCreateCompatibleDevice(SkBitmap::Config config, 271 virtual SkBaseDevice* onCreateCompatibleDevice(SkBitmap::Config config,
274 int width, int height, 272 int width, int height,
275 bool isOpaque, 273 bool isOpaque,
276 Usage usage) SK_OVERRIDE; 274 Usage usage) SK_OVERRIDE;
277 275
278 /** Causes any deferred drawing to the device to be completed. 276 /** Causes any deferred drawing to the device to be completed.
279 */ 277 */
280 virtual void flush() SK_OVERRIDE {} 278 virtual void flush() SK_OVERRIDE {}
281 279
282 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE; 280 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE;
283 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes) SK_OVERRIDE;
284 281
285 SkBitmap fBitmap; 282 SkBitmap fBitmap;
286 283
287 typedef SkBaseDevice INHERITED; 284 typedef SkBaseDevice INHERITED;
288 }; 285 };
289 286
290 #endif // SkBitmapDevice_DEFINED 287 #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