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

Side by Side Diff: src/lazy/SkDiscardablePixelRef.h

Issue 863053002: new API for retrieving YUV data (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update dox Created 5 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
« no previous file with comments | « src/images/SkDecodingImageGenerator.cpp ('k') | src/ports/SkImageGenerator_skia.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 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 SkDiscardablePixelRef_DEFINED 8 #ifndef SkDiscardablePixelRef_DEFINED
9 #define SkDiscardablePixelRef_DEFINED 9 #define SkDiscardablePixelRef_DEFINED
10 10
(...skipping 30 matching lines...) Expand all
41 // PixelRef, since the SkBitmap doesn't expect them to change. 41 // PixelRef, since the SkBitmap doesn't expect them to change.
42 42
43 SkDiscardableMemory* fDiscardableMemory; 43 SkDiscardableMemory* fDiscardableMemory;
44 SkAutoTUnref<SkColorTable> fCTable; 44 SkAutoTUnref<SkColorTable> fCTable;
45 45
46 /* Takes ownership of SkImageGenerator. */ 46 /* Takes ownership of SkImageGenerator. */
47 SkDiscardablePixelRef(const SkImageInfo&, SkImageGenerator*, 47 SkDiscardablePixelRef(const SkImageInfo&, SkImageGenerator*,
48 size_t rowBytes, 48 size_t rowBytes,
49 SkDiscardableMemory::Factory* factory); 49 SkDiscardableMemory::Factory* factory);
50 50
51 virtual bool onGetYUV8Planes(SkISize sizes[3], 51 bool onQueryYUV8(SkISize logical[3], SkISize optimal[3]) SK_OVERRIDE {
52 void* planes[3], 52 return fGenerator->queryYUV8(logical, optimal);
53 size_t rowBytes[3], 53 }
54 SkYUVColorSpace* colorSpace) SK_OVERRIDE { 54
55 return fGenerator->getYUV8Planes(sizes, planes, rowBytes, colorSpace); 55 bool onGetYUV8(const SkISize allocationSizes[3], void* planes[3],
56 SkYUVColorSpace* cspace) SK_OVERRIDE {
57 return fGenerator->getYUV8(allocationSizes, planes, cspace);
56 } 58 }
57 59
58 friend bool SkInstallDiscardablePixelRef(SkImageGenerator*, SkBitmap*, 60 friend bool SkInstallDiscardablePixelRef(SkImageGenerator*, SkBitmap*,
59 SkDiscardableMemory::Factory*); 61 SkDiscardableMemory::Factory*);
60 62
61 typedef SkPixelRef INHERITED; 63 typedef SkPixelRef INHERITED;
62 }; 64 };
63 65
64 #endif // SkDiscardablePixelRef_DEFINED 66 #endif // SkDiscardablePixelRef_DEFINED
OLDNEW
« no previous file with comments | « src/images/SkDecodingImageGenerator.cpp ('k') | src/ports/SkImageGenerator_skia.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698