OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 | 8 |
9 #include "gl/GrGLInterface.h" | 9 #include "gl/GrGLInterface.h" |
10 #include "GrGLTestInterface.h" | 10 #include "GrGLTestInterface.h" |
11 #include "SkMutex.h" | 11 #include "SkMutex.h" |
12 #include "SkTDArray.h" | 12 #include "SkTDArray.h" |
13 | 13 |
14 // added to suppress 'no previous prototype' warning and because this code is du
plicated in | 14 // added to suppress 'no previous prototype' warning and because this code is du
plicated in |
15 // SkNullGLContext.cpp | 15 // SkNullGLContext.cpp |
16 namespace { | 16 namespace { |
17 | 17 |
18 class BufferObj { | 18 class BufferObj { |
19 public: | 19 public: |
20 BufferObj(GrGLuint id) : fID(id), fDataPtr(nullptr), fSize(0), fMapped(false
) {} | 20 BufferObj(GrGLuint id) : fID(id), fDataPtr(nullptr), fSize(0), fMapped(false
) {} |
21 ~BufferObj() { delete[] fDataPtr; } | 21 ~BufferObj() { delete[] fDataPtr; } |
22 | 22 |
23 void allocate(GrGLsizeiptr size, const GrGLchar* dataPtr) { | 23 void allocate(GrGLsizeiptr size, const GrGLchar* dataPtr) { |
24 if (fDataPtr) { | 24 if (fDataPtr) { |
25 SkASSERT(0 != fSize); | 25 SkASSERT(0 != fSize); |
26 delete[] fDataPtr; | 26 delete[] fDataPtr; |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 "GL_ARB_timer_query", | 601 "GL_ARB_timer_query", |
602 "GL_ARB_draw_buffers", | 602 "GL_ARB_draw_buffers", |
603 "GL_ARB_occlusion_query", | 603 "GL_ARB_occlusion_query", |
604 "GL_EXT_stencil_wrap", | 604 "GL_EXT_stencil_wrap", |
605 nullptr, // signifies the end of the array. | 605 nullptr, // signifies the end of the array. |
606 }; | 606 }; |
607 | 607 |
608 } // anonymous namespace | 608 } // anonymous namespace |
609 | 609 |
610 const GrGLInterface* GrGLCreateNullInterface() { return new NullInterface; } | 610 const GrGLInterface* GrGLCreateNullInterface() { return new NullInterface; } |
OLD | NEW |