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

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

Issue 1579323002: Add SkSpecialImage & SkSpecialSurface classes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix another no-gpu issue Created 4 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
« no previous file with comments | « gyp/core.gypi ('k') | src/core/SkSpecialImage.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 374
375 void needsNewGenID(); 375 void needsNewGenID();
376 void callGenIDChangeListeners(); 376 void callGenIDChangeListeners();
377 377
378 void setTemporarilyImmutable(); 378 void setTemporarilyImmutable();
379 void restoreMutability(); 379 void restoreMutability();
380 friend class SkSurface_Raster; // For the two methods above. 380 friend class SkSurface_Raster; // For the two methods above.
381 381
382 bool isPreLocked() const { return fPreLocked; } 382 bool isPreLocked() const { return fPreLocked; }
383 friend class SkImage_Raster; 383 friend class SkImage_Raster;
384 friend class SkSpecialImage_Raster;
384 385
385 // When copying a bitmap to another with the same shape and config, we can s afely 386 // When copying a bitmap to another with the same shape and config, we can s afely
386 // clone the pixelref generation ID too, which makes them equivalent under c aching. 387 // clone the pixelref generation ID too, which makes them equivalent under c aching.
387 friend class SkBitmap; // only for cloneGenID 388 friend class SkBitmap; // only for cloneGenID
388 void cloneGenID(const SkPixelRef&); 389 void cloneGenID(const SkPixelRef&);
389 390
390 void setImmutableWithID(uint32_t genID); 391 void setImmutableWithID(uint32_t genID);
391 friend class SkImage_Gpu; 392 friend class SkImage_Gpu;
392 friend class SkImageCacherator; 393 friend class SkImageCacherator;
393 394
394 typedef SkRefCnt INHERITED; 395 typedef SkRefCnt INHERITED;
395 }; 396 };
396 397
397 class SkPixelRefFactory : public SkRefCnt { 398 class SkPixelRefFactory : public SkRefCnt {
398 public: 399 public:
399 /** 400 /**
400 * Allocate a new pixelref matching the specified ImageInfo, allocating 401 * Allocate a new pixelref matching the specified ImageInfo, allocating
401 * the memory for the pixels. If the ImageInfo requires a ColorTable, 402 * the memory for the pixels. If the ImageInfo requires a ColorTable,
402 * the pixelref will ref() the colortable. 403 * the pixelref will ref() the colortable.
403 * On failure return NULL. 404 * On failure return NULL.
404 */ 405 */
405 virtual SkPixelRef* create(const SkImageInfo&, size_t rowBytes, SkColorTable *) = 0; 406 virtual SkPixelRef* create(const SkImageInfo&, size_t rowBytes, SkColorTable *) = 0;
406 }; 407 };
407 408
408 #endif 409 #endif
OLDNEW
« no previous file with comments | « gyp/core.gypi ('k') | src/core/SkSpecialImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698