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

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

Issue 1262923003: cache private readback for gpu-images (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address items in #4 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 | « no previous file | src/core/SkBitmapCache.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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 friend class SkSurface_Raster; // For the two methods above. 372 friend class SkSurface_Raster; // For the two methods above.
373 373
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);
383 friend class SkImage_Gpu;
384
382 typedef SkRefCnt INHERITED; 385 typedef SkRefCnt INHERITED;
383 }; 386 };
384 387
385 class SkPixelRefFactory : public SkRefCnt { 388 class SkPixelRefFactory : public SkRefCnt {
386 public: 389 public:
387 /** 390 /**
388 * Allocate a new pixelref matching the specified ImageInfo, allocating 391 * Allocate a new pixelref matching the specified ImageInfo, allocating
389 * the memory for the pixels. If the ImageInfo requires a ColorTable, 392 * the memory for the pixels. If the ImageInfo requires a ColorTable,
390 * the pixelref will ref() the colortable. 393 * the pixelref will ref() the colortable.
391 * On failure return NULL. 394 * On failure return NULL.
392 */ 395 */
393 virtual SkPixelRef* create(const SkImageInfo&, size_t rowBytes, SkColorTable *) = 0; 396 virtual SkPixelRef* create(const SkImageInfo&, size_t rowBytes, SkColorTable *) = 0;
394 }; 397 };
395 398
396 #endif 399 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkBitmapCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698