OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ |
6 #define CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ |
7 | 7 |
8 #include "base/atomicops.h" | 8 #include "base/atomicops.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // Returns the shader compiled from the source. | 67 // Returns the shader compiled from the source. |
68 WebKit::WebGLId CompileShaderFromSource(const WebKit::WGC3Dchar* source, | 68 WebKit::WebGLId CompileShaderFromSource(const WebKit::WGC3Dchar* source, |
69 WebKit::WGC3Denum type); | 69 WebKit::WGC3Denum type); |
70 | 70 |
71 // Copies all pixels from |previous_texture| into |texture| that are | 71 // Copies all pixels from |previous_texture| into |texture| that are |
72 // inside the region covered by |old_damage| but not part of |new_damage|. | 72 // inside the region covered by |old_damage| but not part of |new_damage|. |
73 void CopySubBufferDamage(WebKit::WebGLId texture, | 73 void CopySubBufferDamage(WebKit::WebGLId texture, |
74 WebKit::WebGLId previous_texture, | 74 WebKit::WebGLId previous_texture, |
75 const SkRegion& new_damage, | 75 const SkRegion& new_damage, |
76 const SkRegion& old_damage); | 76 const SkRegion& old_damage); |
| 77 |
77 private: | 78 private: |
78 class CopyTextureToImpl; | 79 class CopyTextureToImpl; |
79 | 80 |
80 // Creates |copy_texture_to_impl_| if NULL. | 81 // Creates |copy_texture_to_impl_| if NULL. |
81 void InitCopyTextToImpl(); | 82 void InitCopyTextToImpl(); |
82 | 83 |
83 WebKit::WebGraphicsContext3D* context_; | 84 WebKit::WebGraphicsContext3D* context_; |
84 WebKit::WebGraphicsContext3D* context_for_thread_; | 85 WebKit::WebGraphicsContext3D* context_for_thread_; |
85 scoped_ptr<CopyTextureToImpl> copy_texture_to_impl_; | 86 scoped_ptr<CopyTextureToImpl> copy_texture_to_impl_; |
86 | 87 |
87 // The number of all GLHelper instances. | 88 // The number of all GLHelper instances. |
88 static base::subtle::Atomic32 count_; | 89 static base::subtle::Atomic32 count_; |
89 | 90 |
90 DISALLOW_COPY_AND_ASSIGN(GLHelper); | 91 DISALLOW_COPY_AND_ASSIGN(GLHelper); |
91 }; | 92 }; |
92 | 93 |
93 } // namespace content | 94 } // namespace content |
94 | 95 |
95 #endif // CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ | 96 #endif // CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ |
OLD | NEW |