| David Li | 65948aa | 2011-03-10 16:40:37 -0800 | [diff] [blame] | 1 | /* | 
|  | 2 | ** Copyright 2011, The Android Open Source Project | 
|  | 3 | ** | 
|  | 4 | ** Licensed under the Apache License, Version 2.0 (the "License"); | 
|  | 5 | ** you may not use this file except in compliance with the License. | 
|  | 6 | ** You may obtain a copy of the License at | 
|  | 7 | ** | 
|  | 8 | **     http://www.apache.org/licenses/LICENSE-2.0 | 
|  | 9 | ** | 
|  | 10 | ** Unless required by applicable law or agreed to in writing, software | 
|  | 11 | ** distributed under the License is distributed on an "AS IS" BASIS, | 
|  | 12 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
|  | 13 | ** See the License for the specific language governing permissions and | 
|  | 14 | ** limitations under the License. | 
|  | 15 | */ | 
| David Li | 864f839 | 2011-03-28 10:39:28 -0700 | [diff] [blame] | 16 |  | 
| David Li | 65948aa | 2011-03-10 16:40:37 -0800 | [diff] [blame] | 17 | #ifndef _GLESV2_DBG_H_ | 
|  | 18 | #define _GLESV2_DBG_H_ | 
|  | 19 |  | 
| David Li | 864f839 | 2011-03-28 10:39:28 -0700 | [diff] [blame] | 20 | #include <pthread.h> | 
|  | 21 |  | 
| David Li | 65948aa | 2011-03-10 16:40:37 -0800 | [diff] [blame] | 22 | namespace android | 
|  | 23 | { | 
| David Li | 864f839 | 2011-03-28 10:39:28 -0700 | [diff] [blame] | 24 | struct DbgContext; | 
|  | 25 |  | 
| Mathias Agopian | 518ec11 | 2011-05-13 16:21:08 -0700 | [diff] [blame] | 26 | DbgContext* CreateDbgContext(const unsigned version, const gl_hooks_t * const hooks); | 
| David Li | 864f839 | 2011-03-28 10:39:28 -0700 | [diff] [blame] | 27 |  | 
| Mathias Agopian | 518ec11 | 2011-05-13 16:21:08 -0700 | [diff] [blame] | 28 | void dbgReleaseThread(); | 
| David Li | 864f839 | 2011-03-28 10:39:28 -0700 | [diff] [blame] | 29 |  | 
| David Li | 499c6f0 | 2011-04-08 18:43:16 -0700 | [diff] [blame] | 30 | // create and bind socket if haven't already, if failed to create socket or | 
|  | 31 | //  forceUseFile, then open /data/local/tmp/dump.gles2dbg, exit when size reached | 
|  | 32 | void StartDebugServer(const unsigned short port, const bool forceUseFile, | 
|  | 33 | const unsigned int maxFileSize, const char * const filePath); | 
| David Li | 864f839 | 2011-03-28 10:39:28 -0700 | [diff] [blame] | 34 | void StopDebugServer(); // close socket if open | 
|  | 35 |  | 
| David Li | 65948aa | 2011-03-10 16:40:37 -0800 | [diff] [blame] | 36 | }; // namespace android | 
|  | 37 |  | 
|  | 38 | #endif // #ifndef _GLESV2_DBG_H_ |