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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 // 0 if GL_EXT_draw_buffers is not available. | 320 // 0 if GL_EXT_draw_buffers is not available. |
321 GLint MaxDrawBuffers(); | 321 GLint MaxDrawBuffers(); |
322 | 322 |
323 // Checks whether the readbback is supported for texture with the | 323 // Checks whether the readbback is supported for texture with the |
324 // matching config. This doesnt check for cross format readbacks. | 324 // matching config. This doesnt check for cross format readbacks. |
325 bool IsReadbackConfigSupported(SkColorType texture_format); | 325 bool IsReadbackConfigSupported(SkColorType texture_format); |
326 | 326 |
327 protected: | 327 protected: |
328 class CopyTextureToImpl; | 328 class CopyTextureToImpl; |
329 | 329 |
330 // Creates |copy_texture_to_impl_| if NULL. | 330 // Creates |copy_texture_to_impl_| if nullptr. |
331 void InitCopyTextToImpl(); | 331 void InitCopyTextToImpl(); |
332 // Creates |scaler_impl_| if NULL. | 332 // Creates |scaler_impl_| if nullptr. |
333 void InitScalerImpl(); | 333 void InitScalerImpl(); |
334 | 334 |
335 enum ReadbackSwizzle { | 335 enum ReadbackSwizzle { |
336 kSwizzleNone = 0, | 336 kSwizzleNone = 0, |
337 kSwizzleBGRA | 337 kSwizzleBGRA |
338 }; | 338 }; |
339 | 339 |
340 gpu::gles2::GLES2Interface* gl_; | 340 gpu::gles2::GLES2Interface* gl_; |
341 gpu::ContextSupport* context_support_; | 341 gpu::ContextSupport* context_support_; |
342 scoped_ptr<CopyTextureToImpl> copy_texture_to_impl_; | 342 scoped_ptr<CopyTextureToImpl> copy_texture_to_impl_; |
(...skipping 19 matching lines...) Expand all Loading... |
362 virtual void ReadbackYUV(const gpu::Mailbox& mailbox, | 362 virtual void ReadbackYUV(const gpu::Mailbox& mailbox, |
363 uint32 sync_point, | 363 uint32 sync_point, |
364 const scoped_refptr<media::VideoFrame>& target, | 364 const scoped_refptr<media::VideoFrame>& target, |
365 const base::Callback<void(bool)>& callback) = 0; | 365 const base::Callback<void(bool)>& callback) = 0; |
366 virtual GLHelper::ScalerInterface* scaler() = 0; | 366 virtual GLHelper::ScalerInterface* scaler() = 0; |
367 }; | 367 }; |
368 | 368 |
369 } // namespace content | 369 } // namespace content |
370 | 370 |
371 #endif // CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ | 371 #endif // CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ |
OLD | NEW |