OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "content/common/gpu/client/grcontext_for_webgraphicscontext3d.h" | 5 #include "content/common/gpu/client/grcontext_for_webgraphicscontext3d.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <string.h> |
8 | 9 |
9 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "base/trace_event/trace_event.h" | 12 #include "base/trace_event/trace_event.h" |
12 #include "gpu/blink/webgraphicscontext3d_impl.h" | 13 #include "gpu/blink/webgraphicscontext3d_impl.h" |
13 #include "gpu/command_buffer/client/gles2_lib.h" | 14 #include "gpu/command_buffer/client/gles2_lib.h" |
14 #include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h" | 15 #include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h" |
15 #include "third_party/skia/include/gpu/GrContext.h" | 16 #include "third_party/skia/include/gpu/GrContext.h" |
16 | 17 |
17 using gpu_blink::WebGraphicsContext3DImpl; | 18 using gpu_blink::WebGraphicsContext3DImpl; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 GrGLInterfaceForWebGraphicsContext3D::~GrGLInterfaceForWebGraphicsContext3D() { | 99 GrGLInterfaceForWebGraphicsContext3D::~GrGLInterfaceForWebGraphicsContext3D() { |
99 DCHECK(context_thread_checker_.CalledOnValidThread()); | 100 DCHECK(context_thread_checker_.CalledOnValidThread()); |
100 #if !defined(NDEBUG) | 101 #if !defined(NDEBUG) |
101 // Set all the function pointers to zero, in order to crash if function | 102 // Set all the function pointers to zero, in order to crash if function |
102 // pointers are used after free. | 103 // pointers are used after free. |
103 memset(&fFunctions, 0, sizeof(GrGLInterface::Functions)); | 104 memset(&fFunctions, 0, sizeof(GrGLInterface::Functions)); |
104 #endif | 105 #endif |
105 } | 106 } |
106 | 107 |
107 } // namespace content | 108 } // namespace content |
OLD | NEW |