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

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

Issue 105893012: change offset to xy for pixelref subsetting (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 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/SkPicture.h ('k') | src/core/SkBitmap.cpp » ('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 2008 The Android Open Source Project 3 * Copyright 2008 The Android Open Source Project
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 9
10 #ifndef SkPixelRef_DEFINED 10 #ifndef SkPixelRef_DEFINED
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 /** Return the pixel memory returned from lockPixels, or null if the 63 /** Return the pixel memory returned from lockPixels, or null if the
64 lockCount is 0. 64 lockCount is 0.
65 */ 65 */
66 void* pixels() const { return fRec.fPixels; } 66 void* pixels() const { return fRec.fPixels; }
67 67
68 /** Return the current colorTable (if any) if pixels are locked, or null. 68 /** Return the current colorTable (if any) if pixels are locked, or null.
69 */ 69 */
70 SkColorTable* colorTable() const { return fRec.fColorTable; } 70 SkColorTable* colorTable() const { return fRec.fColorTable; }
71 71
72 size_t rowBytes() const { return fRec.fRowBytes; }
73
72 /** 74 /**
73 * To access the actual pixels of a pixelref, it must be "locked". 75 * To access the actual pixels of a pixelref, it must be "locked".
74 * Calling lockPixels returns a LockRec struct (on success). 76 * Calling lockPixels returns a LockRec struct (on success).
75 */ 77 */
76 struct LockRec { 78 struct LockRec {
77 void* fPixels; 79 void* fPixels;
78 SkColorTable* fColorTable; 80 SkColorTable* fColorTable;
79 size_t fRowBytes; 81 size_t fRowBytes;
80 82
81 void zero() { sk_bzero(this, sizeof(*this)); } 83 void zero() { sk_bzero(this, sizeof(*this)); }
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 358
357 // When copying a bitmap to another with the same shape and config, we can s afely 359 // When copying a bitmap to another with the same shape and config, we can s afely
358 // clone the pixelref generation ID too, which makes them equivalent under c aching. 360 // clone the pixelref generation ID too, which makes them equivalent under c aching.
359 friend class SkBitmap; // only for cloneGenID 361 friend class SkBitmap; // only for cloneGenID
360 void cloneGenID(const SkPixelRef&); 362 void cloneGenID(const SkPixelRef&);
361 363
362 typedef SkFlattenable INHERITED; 364 typedef SkFlattenable INHERITED;
363 }; 365 };
364 366
365 #endif 367 #endif
OLDNEW
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698