diff options
author | bsalomon@google.com <bsalomon@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-06 17:21:39 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-06 17:21:39 +0000 |
commit | 4ca1a669c58326d586e35b4d43e9e97626edf0a6 (patch) | |
tree | 8f727d1da26c10b1884da118044a23910bd1ab87 /ui | |
parent | 8cc85fcb137d43a8221aed3bcd8b9e7da1e640a4 (diff) | |
download | chromium_src-4ca1a669c58326d586e35b4d43e9e97626edf0a6.zip chromium_src-4ca1a669c58326d586e35b4d43e9e97626edf0a6.tar.gz chromium_src-4ca1a669c58326d586e35b4d43e9e97626edf0a6.tar.bz2 |
Roll Skia
Setup pointers to cmd buffer GLES2 interface in Ganesh
Review URL: http://codereview.chromium.org/6691042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80642 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gfx/gl/gl.gyp | 4 | ||||
-rw-r--r-- | ui/gfx/gl/gl_bindings_skia.h | 21 | ||||
-rw-r--r-- | ui/gfx/gl/gl_bindings_skia_in_process.cc (renamed from ui/gfx/gl/gl_bindings_skia.cc) | 19 | ||||
-rw-r--r-- | ui/gfx/gl/gl_bindings_skia_in_process.h | 18 |
4 files changed, 26 insertions, 36 deletions
diff --git a/ui/gfx/gl/gl.gyp b/ui/gfx/gl/gl.gyp index f64804b..4cdb279 100644 --- a/ui/gfx/gl/gl.gyp +++ b/ui/gfx/gl/gl.gyp @@ -57,8 +57,8 @@ 'sources': [ 'gl_bindings.gypi', 'gl_bindings.h', - 'gl_bindings_skia.cc', - 'gl_bindings_skia.h', + 'gl_bindings_skia_in_process.cc', + 'gl_bindings_skia_in_process.h', 'gl_context.cc', 'gl_context.h', 'gl_context_linux.cc', diff --git a/ui/gfx/gl/gl_bindings_skia.h b/ui/gfx/gl/gl_bindings_skia.h deleted file mode 100644 index 4433c73..0000000 --- a/ui/gfx/gl/gl_bindings_skia.h +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2011 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_GFX_GL_GL_BINDINGS_SKIA_H_ -#define UI_GFX_GL_GL_BINDINGS_SKIA_H_ -#pragma once - -namespace gfx { - -// The GPU back-end for skia normally makes direct calls to GLES2\gl. Call -// this routine to bind the skia GL implementation to that exported by the -// ui/gfx/gl entry points. -// Note: This override is required to allow the skia gl calls to be correctly -// routed around the command buffers during execution of the DumpRenderTree -// layout tests. -void BindSkiaToHostGL(); - -} - -#endif // UI_GFX_GL_GL_BINDINGS_SKIA_H_ diff --git a/ui/gfx/gl/gl_bindings_skia.cc b/ui/gfx/gl/gl_bindings_skia_in_process.cc index 4f861aa..396ea6b 100644 --- a/ui/gfx/gl/gl_bindings_skia.cc +++ b/ui/gfx/gl/gl_bindings_skia_in_process.cc @@ -3,26 +3,20 @@ // found in the LICENSE file. -#include "ui/gfx/gl/gl_bindings_skia.h" +#include "ui/gfx/gl/gl_bindings_skia_in_process.h" #include "base/logging.h" #include "ui/gfx/gl/gl_bindings.h" #include "ui/gfx/gl/gl_implementation.h" -// Skia is built against the headers in gpu\GLES. These functions -// are exported without any call-type modifiers. -#define GR_GL_FUNCTION_TYPE - #include "third_party/skia/gpu/include/GrGLInterface.h" namespace { extern "C" { - // The following stub functions are required because the glXXX routines exported // via gl_bindings.h use call-type GL_BINDING_CALL, which on Windows is stdcall. -// Skia has been built against the GLES headers, so the interfaces in -// GrGLInterface are __cdecl. +// Skia has been built such that its GrGLInterface GL pointers are __cdecl. GLvoid StubGLActiveTexture(GLenum texture) { glActiveTexture(texture); @@ -69,12 +63,12 @@ GLvoid StubGLBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, mask, filter); } -GLvoid StubGLBufferData(GLenum target, GLsizei size, const void* data, +GLvoid StubGLBufferData(GLenum target, GLsizeiptr size, const void* data, GLenum usage) { glBufferData(target, size, data, usage); } -GLvoid StubGLBufferSubData(GLenum target, GLint offset, GLsizei size, +GLvoid StubGLBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void* data) { glBufferSubData(target, offset, size, data); } @@ -373,13 +367,11 @@ GLvoid StubGLVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLvoid StubGLViewport(GLint x, GLint y, GLsizei width, GLsizei height) { glViewport(x, y, width, height); } - } // extern "C" // Populate |gl_interface| with pointers to the GL implementation used by // Chrome. void InitializeGrGLInterface(GrGLInterface* gl_interface) { - // Propagate the type of GL bindings exported back to skia. switch (gfx::GetGLImplementation()) { case gfx::kGLImplementationNone: @@ -498,7 +490,7 @@ void InitializeGrGLInterface(GrGLInterface* gl_interface) { namespace gfx { -void BindSkiaToHostGL() { +void BindSkiaToInProcessGL() { static GrGLInterface host_gl_interface; static bool host_StubGL_initialized = false; if (!host_StubGL_initialized) { @@ -509,3 +501,4 @@ void BindSkiaToHostGL() { } } // namespace gfx + diff --git a/ui/gfx/gl/gl_bindings_skia_in_process.h b/ui/gfx/gl/gl_bindings_skia_in_process.h new file mode 100644 index 0000000..2905bf4 --- /dev/null +++ b/ui/gfx/gl/gl_bindings_skia_in_process.h @@ -0,0 +1,18 @@ +// Copyright (c) 2011 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_GFX_GL_GL_BINDINGS_SKIA_IN_PROCESS_H_ +#define UI_GFX_GL_GL_BINDINGS_SKIA_IN_PROCESS_H_ +#pragma once + +namespace gfx { + +// The GPU back-end for skia requires pointers to GL functions. This function +// binds skia-gpu to the in-process GL +void BindSkiaToInProcessGL(); + +} + +#endif // UI_GFX_GL_GL_BINDINGS_SKIA_IN_PROCESS_H_ + |