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

Side by Side Diff: src/image/SkImagePriv.h

Issue 577063004: Refactoring in SkImage implementations backed by a SkBitmap (Closed) Base URL: https://skia.googlesource.com/skia.git@small_refactor_skimageCodec
Patch Set: Get rid of SkImage_Codec Created 6 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
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 SkImagePriv_DEFINED 8 #ifndef SkImagePriv_DEFINED
9 #define SkImagePriv_DEFINED 9 #define SkImagePriv_DEFINED
10 10
11 #include "SkBitmap.h" 11 #include "SkBitmap.h"
12 #include "SkImage.h" 12
13 class SkImage;
13 14
14 // Call this if you explicitly want to use/share this pixelRef in the image 15 // Call this if you explicitly want to use/share this pixelRef in the image
15 extern SkImage* SkNewImageFromPixelRef(const SkImageInfo&, SkPixelRef*, 16 extern SkImage* SkNewImageFromPixelRef(const SkImageInfo&, SkPixelRef*,
16 size_t rowBytes); 17 size_t rowBytes);
17 18
18 /** 19 /**
19 * Examines the bitmap to decide if it can share the existing pixelRef, or 20 * Examines the bitmap to decide if it can share the existing pixelRef, or
20 * if it needs to make a deep-copy of the pixels. The bitmap's pixelref will 21 * if it needs to make a deep-copy of the pixels. The bitmap's pixelref will
21 * be shared if either the bitmap is marked as immutable, or canSharePixelRef 22 * be shared if either the bitmap is marked as immutable, or canSharePixelRef
22 * is true. 23 * is true.
(...skipping 17 matching lines...) Expand all
40 // may be called to see if the surface and the image share the same GrTexture, 41 // may be called to see if the surface and the image share the same GrTexture,
41 // in which case the surface may need to perform a copy-on-write. 42 // in which case the surface may need to perform a copy-on-write.
42 extern GrTexture* SkTextureImageGetTexture(SkImage* textureImage); 43 extern GrTexture* SkTextureImageGetTexture(SkImage* textureImage);
43 44
44 // Update the texture wrapped by an image created with NewTexture. This 45 // Update the texture wrapped by an image created with NewTexture. This
45 // is called when a surface and image share the same GrTexture and the 46 // is called when a surface and image share the same GrTexture and the
46 // surface needs to perform a copy-on-write 47 // surface needs to perform a copy-on-write
47 extern void SkTextureImageSetTexture(SkImage* image, GrTexture* texture); 48 extern void SkTextureImageSetTexture(SkImage* image, GrTexture* texture);
48 49
49 #endif 50 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698