| 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_BROWSER_COMPOSITOR_GL_HELPER_H_ |
| 6 #define CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_GL_HELPER_H_ |
| 7 | 7 |
| 8 #include "base/atomicops.h" | 8 #include "base/atomicops.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "gpu/command_buffer/client/gles2_interface.h" | 13 #include "gpu/command_buffer/client/gles2_interface.h" |
| 14 #include "gpu/command_buffer/common/mailbox_holder.h" | 14 #include "gpu/command_buffer/common/mailbox_holder.h" |
| 15 #include "third_party/skia/include/core/SkBitmap.h" | 15 #include "third_party/skia/include/core/SkBitmap.h" |
| 16 | 16 |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 bool IsReadbackConfigSupported(SkColorType texture_format); | 331 bool IsReadbackConfigSupported(SkColorType texture_format); |
| 332 | 332 |
| 333 protected: | 333 protected: |
| 334 class CopyTextureToImpl; | 334 class CopyTextureToImpl; |
| 335 | 335 |
| 336 // Creates |copy_texture_to_impl_| if NULL. | 336 // Creates |copy_texture_to_impl_| if NULL. |
| 337 void InitCopyTextToImpl(); | 337 void InitCopyTextToImpl(); |
| 338 // Creates |scaler_impl_| if NULL. | 338 // Creates |scaler_impl_| if NULL. |
| 339 void InitScalerImpl(); | 339 void InitScalerImpl(); |
| 340 | 340 |
| 341 enum ReadbackSwizzle { | 341 enum ReadbackSwizzle { kSwizzleNone = 0, kSwizzleBGRA }; |
| 342 kSwizzleNone = 0, | |
| 343 kSwizzleBGRA | |
| 344 }; | |
| 345 | 342 |
| 346 gpu::gles2::GLES2Interface* gl_; | 343 gpu::gles2::GLES2Interface* gl_; |
| 347 gpu::ContextSupport* context_support_; | 344 gpu::ContextSupport* context_support_; |
| 348 scoped_ptr<CopyTextureToImpl> copy_texture_to_impl_; | 345 scoped_ptr<CopyTextureToImpl> copy_texture_to_impl_; |
| 349 scoped_ptr<GLHelperScaling> scaler_impl_; | 346 scoped_ptr<GLHelperScaling> scaler_impl_; |
| 350 scoped_ptr<GLHelperReadbackSupport> readback_support_; | 347 scoped_ptr<GLHelperReadbackSupport> readback_support_; |
| 351 | 348 |
| 352 DISALLOW_COPY_AND_ASSIGN(GLHelper); | 349 DISALLOW_COPY_AND_ASSIGN(GLHelper); |
| 353 }; | 350 }; |
| 354 | 351 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 372 virtual void ReadbackYUV(const gpu::Mailbox& mailbox, | 369 virtual void ReadbackYUV(const gpu::Mailbox& mailbox, |
| 373 const gpu::SyncToken& sync_token, | 370 const gpu::SyncToken& sync_token, |
| 374 const scoped_refptr<media::VideoFrame>& target, | 371 const scoped_refptr<media::VideoFrame>& target, |
| 375 const gfx::Point& paste_location, | 372 const gfx::Point& paste_location, |
| 376 const base::Callback<void(bool)>& callback) = 0; | 373 const base::Callback<void(bool)>& callback) = 0; |
| 377 virtual GLHelper::ScalerInterface* scaler() = 0; | 374 virtual GLHelper::ScalerInterface* scaler() = 0; |
| 378 }; | 375 }; |
| 379 | 376 |
| 380 } // namespace content | 377 } // namespace content |
| 381 | 378 |
| 382 #endif // CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ | 379 #endif // CONTENT_BROWSER_COMPOSITOR_GL_HELPER_H_ |
| OLD | NEW |