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

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

Issue 1291803002: Extend SkImageGenerator to support natively generated GrTextures (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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 | « include/core/SkImageInfo.h ('k') | include/gpu/SkGr.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 * Copyright 2008 The Android Open Source Project 2 * Copyright 2008 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkPixelRef_DEFINED 8 #ifndef SkPixelRef_DEFINED
9 #define SkPixelRef_DEFINED 9 #define SkPixelRef_DEFINED
10 10
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 bool isPreLocked() const { return fPreLocked; } 374 bool isPreLocked() const { return fPreLocked; }
375 friend class SkImage_Raster; 375 friend class SkImage_Raster;
376 376
377 // When copying a bitmap to another with the same shape and config, we can s afely 377 // When copying a bitmap to another with the same shape and config, we can s afely
378 // clone the pixelref generation ID too, which makes them equivalent under c aching. 378 // clone the pixelref generation ID too, which makes them equivalent under c aching.
379 friend class SkBitmap; // only for cloneGenID 379 friend class SkBitmap; // only for cloneGenID
380 void cloneGenID(const SkPixelRef&); 380 void cloneGenID(const SkPixelRef&);
381 381
382 void setImmutableWithID(uint32_t genID); 382 void setImmutableWithID(uint32_t genID);
383 friend class SkImage_Gpu; 383 friend class SkImage_Gpu;
384 friend class SkImageCacherator;
384 385
385 typedef SkRefCnt INHERITED; 386 typedef SkRefCnt INHERITED;
386 }; 387 };
387 388
388 class SkPixelRefFactory : public SkRefCnt { 389 class SkPixelRefFactory : public SkRefCnt {
389 public: 390 public:
390 /** 391 /**
391 * Allocate a new pixelref matching the specified ImageInfo, allocating 392 * Allocate a new pixelref matching the specified ImageInfo, allocating
392 * the memory for the pixels. If the ImageInfo requires a ColorTable, 393 * the memory for the pixels. If the ImageInfo requires a ColorTable,
393 * the pixelref will ref() the colortable. 394 * the pixelref will ref() the colortable.
394 * On failure return NULL. 395 * On failure return NULL.
395 */ 396 */
396 virtual SkPixelRef* create(const SkImageInfo&, size_t rowBytes, SkColorTable *) = 0; 397 virtual SkPixelRef* create(const SkImageInfo&, size_t rowBytes, SkColorTable *) = 0;
397 }; 398 };
398 399
399 #endif 400 #endif
OLDNEW
« no previous file with comments | « include/core/SkImageInfo.h ('k') | include/gpu/SkGr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698