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

Unified Diff: content/common/gpu/media/surfaceless_gl_renderer.h

Issue 940903002: video_decode_accelerator_unittest: enable test on ozone surfaceless (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after split Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/media/rendering_helper.cc ('k') | content/common/gpu/media/surfaceless_gl_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/surfaceless_gl_renderer.h
diff --git a/ui/ozone/demo/surfaceless_gl_renderer.h b/content/common/gpu/media/surfaceless_gl_renderer.h
similarity index 59%
copy from ui/ozone/demo/surfaceless_gl_renderer.h
copy to content/common/gpu/media/surfaceless_gl_renderer.h
index 9356ab1b588741b7f4c5abc9865f1b49a0f32676..0a26ad8ecdd8643e267a387808a18b5b87245d89 100644
--- a/ui/ozone/demo/surfaceless_gl_renderer.h
+++ b/content/common/gpu/media/surfaceless_gl_renderer.h
@@ -1,43 +1,46 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
+// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_OZONE_DEMO_SURFACELESS_GL_RENDERER_H_
-#define UI_OZONE_DEMO_SURFACELESS_GL_RENDERER_H_
+#ifndef CONTENT_COMMON_GPU_MEDIA_SURFACELESS_GL_RENDERER_H_
+#define CONTENT_COMMON_GPU_MEDIA_SURFACELESS_GL_RENDERER_H_
#include "base/memory/weak_ptr.h"
-#include "ui/ozone/demo/gl_renderer.h"
+#include "content/common/gpu/media/gl_renderer.h"
namespace gfx {
class GLImage;
} // namespace gfx
namespace ui {
-
class GpuMemoryBufferFactoryOzoneNativeBuffer;
+} // namespace ui
+
+namespace content {
class SurfacelessGlRenderer : public GlRenderer {
public:
SurfacelessGlRenderer(
gfx::AcceleratedWidget widget,
const gfx::Size& size,
- GpuMemoryBufferFactoryOzoneNativeBuffer* buffer_factory);
+ ui::GpuMemoryBufferFactoryOzoneNativeBuffer* buffer_factory);
~SurfacelessGlRenderer() override;
- // Renderer:
+ // GlRenderer:
bool Initialize() override;
- void RenderFrame() override;
+ bool MakeCurrent() override;
+ void SwapBuffers() override;
+ bool IsFlipped() override;
+ void BindFramebuffer(uint32_t fbo) override;
+ void UnbindFramebuffer() override;
private:
- // Called by swap buffers when the actual swap finished.
- void OnSwapBuffersAck();
-
class BufferWrapper {
public:
BufferWrapper();
~BufferWrapper();
- bool Initialize(GpuMemoryBufferFactoryOzoneNativeBuffer* buffer_factory,
+ bool Initialize(ui::GpuMemoryBufferFactoryOzoneNativeBuffer* buffer_factory,
gfx::AcceleratedWidget widget,
const gfx::Size& size);
void BindFramebuffer();
@@ -52,17 +55,16 @@ class SurfacelessGlRenderer : public GlRenderer {
unsigned int gl_tex_;
};
- GpuMemoryBufferFactoryOzoneNativeBuffer* buffer_factory_;
+ ui::GpuMemoryBufferFactoryOzoneNativeBuffer* buffer_factory_;
dnicoara 2015/02/27 16:58:47 Since we're in src/content, you should be able to
llandwerlin-old 2015/03/02 11:21:04 Done.
BufferWrapper buffers_[2];
int back_buffer_;
- bool is_swapping_buffers_;
base::WeakPtrFactory<SurfacelessGlRenderer> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(SurfacelessGlRenderer);
};
-} // namespace ui
+} // namespace content
-#endif // UI_OZONE_DEMO_SURFACELESS_GL_RENDERER_H_
+#endif // CONTENT_COMMON_GPU_MEDIA_SURFACELESS_GL_RENDERER_H_
« no previous file with comments | « content/common/gpu/media/rendering_helper.cc ('k') | content/common/gpu/media/surfaceless_gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698