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/images/SkImageRef_ashmem.h

Issue 112603003: Reverting r12665 & r12666 (Remove duplicate impl for SkImageInfo flattening) due to Chromium/Blink … (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « src/images/SkImageRef_GlobalPool.cpp ('k') | src/images/SkImageRef_ashmem.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #ifndef SkImageRef_ashmem_DEFINED 8 #ifndef SkImageRef_ashmem_DEFINED
9 #define SkImageRef_ashmem_DEFINED 9 #define SkImageRef_ashmem_DEFINED
10 10
11 #include "SkImageRef.h" 11 #include "SkImageRef.h"
12 12
13 struct SkAshmemRec { 13 struct SkAshmemRec {
14 int fFD; 14 int fFD;
15 void* fAddr; 15 void* fAddr;
16 size_t fSize; 16 size_t fSize;
17 bool fPinned; 17 bool fPinned;
18 }; 18 };
19 19
20 class SkImageRef_ashmem : public SkImageRef { 20 class SkImageRef_ashmem : public SkImageRef {
21 public: 21 public:
22 SkImageRef_ashmem(const SkImageInfo&, SkStreamRewindable*, int sampleSize = 1); 22 SkImageRef_ashmem(SkStreamRewindable*, SkBitmap::Config, int sampleSize = 1) ;
23 virtual ~SkImageRef_ashmem(); 23 virtual ~SkImageRef_ashmem();
24 24
25 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkImageRef_ashmem) 25 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkImageRef_ashmem)
26 26
27 protected: 27 protected:
28 SkImageRef_ashmem(SkFlattenableReadBuffer&); 28 SkImageRef_ashmem(SkFlattenableReadBuffer&);
29 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; 29 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
30 30
31 virtual bool onDecode(SkImageDecoder* codec, SkStreamRewindable* stream, 31 virtual bool onDecode(SkImageDecoder* codec, SkStreamRewindable* stream,
32 SkBitmap* bitmap, SkBitmap::Config config, 32 SkBitmap* bitmap, SkBitmap::Config config,
33 SkImageDecoder::Mode mode); 33 SkImageDecoder::Mode mode);
34 34
35 virtual void* onLockPixels(SkColorTable**); 35 virtual void* onLockPixels(SkColorTable**);
36 virtual void onUnlockPixels(); 36 virtual void onUnlockPixels();
37 37
38 private: 38 private:
39 void closeFD(); 39 void closeFD();
40 40
41 SkColorTable* fCT; 41 SkColorTable* fCT;
42 SkAshmemRec fRec; 42 SkAshmemRec fRec;
43 43
44 typedef SkImageRef INHERITED; 44 typedef SkImageRef INHERITED;
45 }; 45 };
46 46
47 #endif 47 #endif
OLDNEW
« no previous file with comments | « src/images/SkImageRef_GlobalPool.cpp ('k') | src/images/SkImageRef_ashmem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698