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

Side by Side Diff: src/core/SkBuffer.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/core/SkBlitter_RGB16.cpp ('k') | src/core/SkColorShader.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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 SkBuffer_DEFINED 10 #ifndef SkBuffer_DEFINED
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 error is set if the read operation is attempting to read past the end of the data. 98 error is set if the read operation is attempting to read past the end of the data.
99 */ 99 */
100 class SkRBufferWithSizeCheck : public SkRBuffer { 100 class SkRBufferWithSizeCheck : public SkRBuffer {
101 public: 101 public:
102 SkRBufferWithSizeCheck(const void* data, size_t size) : SkRBuffer(data, size ), fError(false) {} 102 SkRBufferWithSizeCheck(const void* data, size_t size) : SkRBuffer(data, size ), fError(false) {}
103 103
104 /** Read the specified number of bytes from the data pointer. If buffer is n ot 104 /** Read the specified number of bytes from the data pointer. If buffer is n ot
105 null and the number of bytes to read does not overflow this object's dat a, 105 null and the number of bytes to read does not overflow this object's dat a,
106 copy those bytes into buffer. 106 copy those bytes into buffer.
107 */ 107 */
108 virtual bool read(void* buffer, size_t size) SK_OVERRIDE; 108 bool read(void* buffer, size_t size) SK_OVERRIDE;
109 109
110 /** Returns whether or not a read operation attempted to read past the end o f the data. 110 /** Returns whether or not a read operation attempted to read past the end o f the data.
111 */ 111 */
112 bool isValid() const { return !fError; } 112 bool isValid() const { return !fError; }
113 private: 113 private:
114 bool fError; 114 bool fError;
115 }; 115 };
116 116
117 /** \class SkWBuffer 117 /** \class SkWBuffer
118 118
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 private: 162 private:
163 void writeNoSizeCheck(const void* buffer, size_t size); 163 void writeNoSizeCheck(const void* buffer, size_t size);
164 164
165 char* fData; 165 char* fData;
166 char* fPos; 166 char* fPos;
167 char* fStop; 167 char* fStop;
168 }; 168 };
169 169
170 #endif 170 #endif
OLDNEW
« no previous file with comments | « src/core/SkBlitter_RGB16.cpp ('k') | src/core/SkColorShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698