Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: content/common/gpu/client/gl_helper.h

Issue 188633002: Query the preferred readback config in CopyFromBackingStore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 bool use_mrt); 323 bool use_mrt);
324 324
325 // Returns the maximum number of draw buffers available, 325 // Returns the maximum number of draw buffers available,
326 // 0 if GL_EXT_draw_buffers is not available. 326 // 0 if GL_EXT_draw_buffers is not available.
327 GLint MaxDrawBuffers(); 327 GLint MaxDrawBuffers();
328 328
329 // Checks whether the readbback is supported for texture with the 329 // Checks whether the readbback is supported for texture with the
330 // matching config. This doesnt check for cross format readbacks. 330 // matching config. This doesnt check for cross format readbacks.
331 bool IsReadbackConfigSupported(SkBitmap::Config texture_format); 331 bool IsReadbackConfigSupported(SkBitmap::Config texture_format);
332 332
333 // Returns the preffered readback-config based on the platform criteria.
334 SkBitmap::Config PreferredReadbackFormat();
335
333 protected: 336 protected:
334 class CopyTextureToImpl; 337 class CopyTextureToImpl;
335 338
336 // Creates |copy_texture_to_impl_| if NULL. 339 // Creates |copy_texture_to_impl_| if NULL.
337 void InitCopyTextToImpl(); 340 void InitCopyTextToImpl();
338 // Creates |scaler_impl_| if NULL. 341 // Creates |scaler_impl_| if NULL.
339 void InitScalerImpl(); 342 void InitScalerImpl();
340 343
341 gpu::gles2::GLES2Interface* gl_; 344 gpu::gles2::GLES2Interface* gl_;
342 gpu::ContextSupport* context_support_; 345 gpu::ContextSupport* context_support_;
(...skipping 20 matching lines...) Expand all
363 virtual void ReadbackYUV(const gpu::Mailbox& mailbox, 366 virtual void ReadbackYUV(const gpu::Mailbox& mailbox,
364 uint32 sync_point, 367 uint32 sync_point,
365 const scoped_refptr<media::VideoFrame>& target, 368 const scoped_refptr<media::VideoFrame>& target,
366 const base::Callback<void(bool)>& callback) = 0; 369 const base::Callback<void(bool)>& callback) = 0;
367 virtual GLHelper::ScalerInterface* scaler() = 0; 370 virtual GLHelper::ScalerInterface* scaler() = 0;
368 }; 371 };
369 372
370 } // namespace content 373 } // namespace content
371 374
372 #endif // CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ 375 #endif // CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698