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

Side by Side Diff: content/browser/compositor/gl_helper.h

Issue 1893473002: Decouple GLHelper from media (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed content_browsertests Created 4 years, 8 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
« no previous file with comments | « no previous file | content/browser/compositor/gl_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BROWSER_COMPOSITOR_GL_HELPER_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_GL_HELPER_H_
6 #define CONTENT_BROWSER_COMPOSITOR_GL_HELPER_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_GL_HELPER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/atomicops.h" 10 #include "base/atomicops.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "gpu/command_buffer/client/gles2_interface.h" 14 #include "gpu/command_buffer/client/gles2_interface.h"
15 #include "gpu/command_buffer/common/mailbox_holder.h" 15 #include "gpu/command_buffer/common/mailbox_holder.h"
16 #include "third_party/skia/include/core/SkBitmap.h" 16 #include "third_party/skia/include/core/SkBitmap.h"
17 17
18 namespace gfx { 18 namespace gfx {
19 class Point; 19 class Point;
20 class Rect; 20 class Rect;
21 class Size; 21 class Size;
22 } 22 }
23 23
24 namespace gpu { 24 namespace gpu {
25 class ContextSupport; 25 class ContextSupport;
26 struct Mailbox; 26 struct Mailbox;
27 } 27 }
28 28
29 namespace media {
30 class VideoFrame;
31 };
32
33 class SkRegion; 29 class SkRegion;
34 30
35 namespace content { 31 namespace content {
36 32
37 class GLHelperScaling; 33 class GLHelperScaling;
38 34
39 class ScopedGLuint { 35 class ScopedGLuint {
40 public: 36 public:
41 typedef void (gpu::gles2::GLES2Interface::*GenFunc)(GLsizei n, GLuint* ids); 37 typedef void (gpu::gles2::GLES2Interface::*GenFunc)(GLsizei n, GLuint* ids);
42 typedef void (gpu::gles2::GLES2Interface::*DeleteFunc)(GLsizei n, 38 typedef void (gpu::gles2::GLES2Interface::*DeleteFunc)(GLsizei n,
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 ReadbackYUVInterface() {} 358 ReadbackYUVInterface() {}
363 virtual ~ReadbackYUVInterface() {} 359 virtual ~ReadbackYUVInterface() {}
364 360
365 // Note that |target| must use YV12 format. |paste_location| specifies where 361 // Note that |target| must use YV12 format. |paste_location| specifies where
366 // the captured pixels that are read back will be placed in the video frame. 362 // the captured pixels that are read back will be placed in the video frame.
367 // The region defined by the |paste_location| and the |dst_size| specified in 363 // The region defined by the |paste_location| and the |dst_size| specified in
368 // the call to CreateReadbackPipelineYUV() must be fully contained within 364 // the call to CreateReadbackPipelineYUV() must be fully contained within
369 // |target->visible_rect()|. 365 // |target->visible_rect()|.
370 virtual void ReadbackYUV(const gpu::Mailbox& mailbox, 366 virtual void ReadbackYUV(const gpu::Mailbox& mailbox,
371 const gpu::SyncToken& sync_token, 367 const gpu::SyncToken& sync_token,
372 const scoped_refptr<media::VideoFrame>& target, 368 const gfx::Rect& target_visible_rect,
369 int y_plane_row_stride_bytes,
370 unsigned char* y_plane_data,
371 int u_plane_row_stride_bytes,
372 unsigned char* u_plane_data,
373 int v_plane_row_stride_bytes,
374 unsigned char* v_plane_data,
373 const gfx::Point& paste_location, 375 const gfx::Point& paste_location,
374 const base::Callback<void(bool)>& callback) = 0; 376 const base::Callback<void(bool)>& callback) = 0;
375 virtual GLHelper::ScalerInterface* scaler() = 0; 377 virtual GLHelper::ScalerInterface* scaler() = 0;
376 }; 378 };
377 379
378 } // namespace content 380 } // namespace content
379 381
380 #endif // CONTENT_BROWSER_COMPOSITOR_GL_HELPER_H_ 382 #endif // CONTENT_BROWSER_COMPOSITOR_GL_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/compositor/gl_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698