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

Side by Side Diff: include/utils/win/SkIStream.h

Issue 861413002: Remove staging SkStream::unref(). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix stragglers. 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
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 8
9 9
10 #ifndef SkIStream_DEFINED 10 #ifndef SkIStream_DEFINED
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 virtual HRESULT STDMETHODCALLTYPE Seek(LARGE_INTEGER liDistanceToMove 69 virtual HRESULT STDMETHODCALLTYPE Seek(LARGE_INTEGER liDistanceToMove
70 , DWORD dwOrigin 70 , DWORD dwOrigin
71 , ULARGE_INTEGER* lpNewFilePointer); 71 , ULARGE_INTEGER* lpNewFilePointer);
72 72
73 virtual HRESULT STDMETHODCALLTYPE Stat(STATSTG* pStatstg 73 virtual HRESULT STDMETHODCALLTYPE Stat(STATSTG* pStatstg
74 , DWORD grfStatFlag); 74 , DWORD grfStatFlag);
75 }; 75 };
76 76
77 /** 77 /**
78 * A minimal read-only IStream implementation which wraps an SkIStream. 78 * A minimal read-only IStream implementation which wraps an SkIStream.
scroggo 2015/01/22 13:55:36 nit: wraps an SkStream
79 */ 79 */
80 class SkIStream : public SkBaseIStream { 80 class SkIStream : public SkBaseIStream {
81 private: 81 private:
82 SkStream *fSkStream; 82 SkStream *fSkStream;
83 bool fUnrefOnRelease; 83 bool fDeleteOnRelease;
scroggo 2015/01/22 13:55:36 Could be const?
84 ULARGE_INTEGER fLocation; 84 ULARGE_INTEGER fLocation;
85 85
86 SkIStream(SkStream* stream, bool unrefOnRelease); 86 SkIStream(SkStream* stream, bool fDeleteOnRelease);
87 virtual ~SkIStream(); 87 virtual ~SkIStream();
88 88
89 public: 89 public:
90 HRESULT static CreateFromSkStream(SkStream* stream 90 HRESULT static CreateFromSkStream(SkStream* stream
91 , bool unrefOnRelease 91 , bool fDeleteOnRelease
92 , IStream ** ppStream); 92 , IStream ** ppStream);
93 93
94 virtual HRESULT STDMETHODCALLTYPE Read(void* pv, ULONG cb, ULONG* pcbRead); 94 virtual HRESULT STDMETHODCALLTYPE Read(void* pv, ULONG cb, ULONG* pcbRead);
95 95
96 virtual HRESULT STDMETHODCALLTYPE Write(void const* pv 96 virtual HRESULT STDMETHODCALLTYPE Write(void const* pv
97 , ULONG cb 97 , ULONG cb
98 , ULONG* pcbWritten); 98 , ULONG* pcbWritten);
99 99
100 virtual HRESULT STDMETHODCALLTYPE Seek(LARGE_INTEGER liDistanceToMove 100 virtual HRESULT STDMETHODCALLTYPE Seek(LARGE_INTEGER liDistanceToMove
101 , DWORD dwOrigin 101 , DWORD dwOrigin
(...skipping 20 matching lines...) Expand all
122 , ULONG cb 122 , ULONG cb
123 , ULONG* pcbWritten); 123 , ULONG* pcbWritten);
124 124
125 virtual HRESULT STDMETHODCALLTYPE Commit(DWORD); 125 virtual HRESULT STDMETHODCALLTYPE Commit(DWORD);
126 126
127 virtual HRESULT STDMETHODCALLTYPE Stat(STATSTG* pStatstg 127 virtual HRESULT STDMETHODCALLTYPE Stat(STATSTG* pStatstg
128 , DWORD grfStatFlag); 128 , DWORD grfStatFlag);
129 }; 129 };
130 130
131 #endif 131 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698