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

Side by Side Diff: src/utils/win/SkDWriteFontFileStream.h

Issue 806653007: Fix up all the easy virtual ... SK_OVERRIDE cases. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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/utils/debugger/SkDrawCommand.h ('k') | src/utils/win/SkDWriteGeometrySink.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 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 SkDWriteFontFileStream_DEFINED 8 #ifndef SkDWriteFontFileStream_DEFINED
9 #define SkDWriteFontFileStream_DEFINED 9 #define SkDWriteFontFileStream_DEFINED
10 10
11 #include "SkTypes.h" 11 #include "SkTypes.h"
12 12
13 #include "SkStream.h" 13 #include "SkStream.h"
14 #include "SkTScopedComPtr.h" 14 #include "SkTScopedComPtr.h"
15 15
16 #include <dwrite.h> 16 #include <dwrite.h>
17 17
18 /** 18 /**
19 * An SkStream backed by an IDWriteFontFileStream. 19 * An SkStream backed by an IDWriteFontFileStream.
20 * This allows Skia code to read an IDWriteFontFileStream. 20 * This allows Skia code to read an IDWriteFontFileStream.
21 */ 21 */
22 class SkDWriteFontFileStream : public SkStreamMemory { 22 class SkDWriteFontFileStream : public SkStreamMemory {
23 public: 23 public:
24 explicit SkDWriteFontFileStream(IDWriteFontFileStream* fontFileStream); 24 explicit SkDWriteFontFileStream(IDWriteFontFileStream* fontFileStream);
25 virtual ~SkDWriteFontFileStream(); 25 virtual ~SkDWriteFontFileStream();
26 26
27 virtual size_t read(void* buffer, size_t size) SK_OVERRIDE; 27 size_t read(void* buffer, size_t size) SK_OVERRIDE;
28 virtual bool isAtEnd() const SK_OVERRIDE; 28 bool isAtEnd() const SK_OVERRIDE;
29 virtual bool rewind() SK_OVERRIDE; 29 bool rewind() SK_OVERRIDE;
30 virtual SkDWriteFontFileStream* duplicate() const SK_OVERRIDE; 30 SkDWriteFontFileStream* duplicate() const SK_OVERRIDE;
31 virtual size_t getPosition() const SK_OVERRIDE; 31 size_t getPosition() const SK_OVERRIDE;
32 virtual bool seek(size_t position) SK_OVERRIDE; 32 bool seek(size_t position) SK_OVERRIDE;
33 virtual bool move(long offset) SK_OVERRIDE; 33 bool move(long offset) SK_OVERRIDE;
34 virtual SkDWriteFontFileStream* fork() const SK_OVERRIDE; 34 SkDWriteFontFileStream* fork() const SK_OVERRIDE;
35 virtual size_t getLength() const SK_OVERRIDE; 35 size_t getLength() const SK_OVERRIDE;
36 virtual const void* getMemoryBase() SK_OVERRIDE; 36 const void* getMemoryBase() SK_OVERRIDE;
37 37
38 private: 38 private:
39 SkTScopedComPtr<IDWriteFontFileStream> fFontFileStream; 39 SkTScopedComPtr<IDWriteFontFileStream> fFontFileStream;
40 size_t fPos; 40 size_t fPos;
41 const void* fLockedMemory; 41 const void* fLockedMemory;
42 void* fFragmentLock; 42 void* fFragmentLock;
43 }; 43 };
44 44
45 /** 45 /**
46 * An IDWriteFontFileStream backed by an SkStream. 46 * An IDWriteFontFileStream backed by an SkStream.
(...skipping 21 matching lines...) Expand all
68 68
69 private: 69 private:
70 explicit SkDWriteFontFileStreamWrapper(SkStream* stream); 70 explicit SkDWriteFontFileStreamWrapper(SkStream* stream);
71 virtual ~SkDWriteFontFileStreamWrapper() { } 71 virtual ~SkDWriteFontFileStreamWrapper() { }
72 72
73 ULONG fRefCount; 73 ULONG fRefCount;
74 SkAutoTUnref<SkStream> fStream; 74 SkAutoTUnref<SkStream> fStream;
75 SkMutex fStreamMutex; 75 SkMutex fStreamMutex;
76 }; 76 };
77 #endif 77 #endif
OLDNEW
« no previous file with comments | « src/utils/debugger/SkDrawCommand.h ('k') | src/utils/win/SkDWriteGeometrySink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698