| 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 241 |
| 242 // Copies all pixels from |previous_texture| into |texture| that are | 242 // Copies all pixels from |previous_texture| into |texture| that are |
| 243 // inside the region covered by |old_damage| but not part of |new_damage|. | 243 // inside the region covered by |old_damage| but not part of |new_damage|. |
| 244 void CopySubBufferDamage(GLuint texture, | 244 void CopySubBufferDamage(GLuint texture, |
| 245 GLuint previous_texture, | 245 GLuint previous_texture, |
| 246 const SkRegion& new_damage, | 246 const SkRegion& new_damage, |
| 247 const SkRegion& old_damage); | 247 const SkRegion& old_damage); |
| 248 | 248 |
| 249 // Simply creates a texture. | 249 // Simply creates a texture. |
| 250 GLuint CreateTexture(); | 250 GLuint CreateTexture(); |
| 251 |
| 251 // Deletes a texture. | 252 // Deletes a texture. |
| 252 void DeleteTexture(GLuint texture_id); | 253 void DeleteTexture(GLuint texture_id); |
| 253 | 254 |
| 254 // Insert a sync point into the GL command buffer. | 255 // Insert a sync point into the GL command buffer. |
| 255 uint32 InsertSyncPoint(); | 256 uint32 InsertSyncPoint(); |
| 256 // Wait for the sync point before executing further GL commands. | 257 // Wait for the sync point before executing further GL commands. |
| 257 void WaitSyncPoint(uint32 sync_point); | 258 void WaitSyncPoint(uint32 sync_point); |
| 258 | 259 |
| 259 // Creates a mailbox holder that is attached to the given texture id, with a | 260 // Creates a mailbox holder that is attached to the given texture id, with a |
| 260 // sync point to wait on before using the mailbox. Returns a holder with an | 261 // sync point to wait on before using the mailbox. Returns a holder with an |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 virtual void ReadbackYUV(const gpu::Mailbox& mailbox, | 363 virtual void ReadbackYUV(const gpu::Mailbox& mailbox, |
| 363 uint32 sync_point, | 364 uint32 sync_point, |
| 364 const scoped_refptr<media::VideoFrame>& target, | 365 const scoped_refptr<media::VideoFrame>& target, |
| 365 const base::Callback<void(bool)>& callback) = 0; | 366 const base::Callback<void(bool)>& callback) = 0; |
| 366 virtual GLHelper::ScalerInterface* scaler() = 0; | 367 virtual GLHelper::ScalerInterface* scaler() = 0; |
| 367 }; | 368 }; |
| 368 | 369 |
| 369 } // namespace content | 370 } // namespace content |
| 370 | 371 |
| 371 #endif // CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ | 372 #endif // CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ |
| OLD | NEW |