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

Unified Diff: media/tools/shader_bench/gpu_painter.h

Issue 7021014: GLContext no longer holds a pointer to a GLSurface. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
Index: media/tools/shader_bench/gpu_painter.h
===================================================================
--- media/tools/shader_bench/gpu_painter.h (revision 86168)
+++ media/tools/shader_bench/gpu_painter.h (working copy)
@@ -9,6 +9,7 @@
#include "ui/gfx/gl/gl_bindings.h"
#include "ui/gfx/gl/gl_context.h"
#include "ui/gfx/gl/gl_implementation.h"
+#include "ui/gfx/gl/gl_surface.h"
// Class that renders video frames to a window via GPU.
class GPUPainter : public Painter {
@@ -17,10 +18,11 @@
virtual ~GPUPainter();
// Returns a reference to the GL context.
+ gfx::GLSurface* surface() const { return surface_; }
gfx::GLContext* context() const { return context_; }
// Sets context for subsequent gl calls in this painter.
- virtual void SetGLContext(gfx::GLContext* context);
+ virtual void SetGLContext(gfx::GLSurface* surface, gfx::GLContext* context);
// Creates shader program into given context, from the vertex and fragment
// shader source code. Returns the id of the shader program.
@@ -34,6 +36,7 @@
GLuint LoadShader(unsigned type, const char* shader_source);
// Reference to the gl context.
+ gfx::GLSurface* surface_;
gfx::GLContext* context_;
DISALLOW_COPY_AND_ASSIGN(GPUPainter);

Powered by Google App Engine
This is Rietveld 408576698