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

Side by Side Diff: gpu/command_buffer/service/common_decoder.h

Issue 5383001: Revert 67293 BrowserTestCanLaunchWithOSMesa was consistently failing - Initia... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_COMMAND_BUFFER_SERVICE_COMMON_DECODER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_COMMON_DECODER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_COMMON_DECODER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_COMMON_DECODER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <stack> 9 #include <stack>
10 #include <string> 10 #include <string>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 // Sets the size of the bucket. 67 // Sets the size of the bucket.
68 void SetSize(size_t size); 68 void SetSize(size_t size);
69 69
70 // Sets a part of the bucket. 70 // Sets a part of the bucket.
71 // Returns false if offset or size is out of range. 71 // Returns false if offset or size is out of range.
72 bool SetData(const void* src, size_t offset, size_t size); 72 bool SetData(const void* src, size_t offset, size_t size);
73 73
74 // Sets the bucket data from a string. Strings are passed NULL terminated to 74 // Sets the bucket data from a string. Strings are passed NULL terminated to
75 // distinguish between empty string and no string. 75 // distinguish between empty string and no string.
76 void SetFromString(const char* str); 76 void SetFromString(const std::string& str);
77 77
78 // Gets the bucket data as a string. Strings are passed NULL terminated to 78 // Gets the bucket data as a string. Strings are passed NULL terminated to
79 // distrinquish between empty string and no string. Returns False if there 79 // distrinquish between empty string and no string. Returns False if there
80 // is no string. 80 // is no string.
81 bool GetAsString(std::string* str); 81 bool GetAsString(std::string* str);
82 82
83 private: 83 private:
84 bool OffsetSizeValid(size_t offset, size_t size) const { 84 bool OffsetSizeValid(size_t offset, size_t size) const {
85 size_t temp = offset + size; 85 size_t temp = offset + size;
86 return temp <= size_ && temp >= offset; 86 return temp <= size_ && temp >= offset;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 uint32 offset; 174 uint32 offset;
175 }; 175 };
176 std::stack<CommandAddress> call_stack_; 176 std::stack<CommandAddress> call_stack_;
177 }; 177 };
178 178
179 } // namespace gpu 179 } // namespace gpu
180 180
181 #endif // GPU_COMMAND_BUFFER_SERVICE_COMMON_DECODER_H_ 181 #endif // GPU_COMMAND_BUFFER_SERVICE_COMMON_DECODER_H_
182 182
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_demo_cc.cc ('k') | gpu/command_buffer/service/common_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698