summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authorbajones@chromium.org <bajones@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-29 21:18:49 +0000
committerbajones@chromium.org <bajones@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-29 21:18:49 +0000
commite1d362ac7ae24c07555d6528889c1779d963e472 (patch)
treeaf3bbe89244e068722c20378b9f736178603fec8 /gpu
parentbe9cfbcea00f811a40987ea2bd01e3f90dfd99cc (diff)
downloadchromium_src-e1d362ac7ae24c07555d6528889c1779d963e472.zip
chromium_src-e1d362ac7ae24c07555d6528889c1779d963e472.tar.gz
chromium_src-e1d362ac7ae24c07555d6528889c1779d963e472.tar.bz2
Reducing code duplication between WGC3D(InProcess)CommandBufferImpl
Currently any time a new GL function is added both classes need to be updated with identical code. This patch moves the shared portion of the code into a common location. R=piman@chromium.org Review URL: https://codereview.chromium.org/305643004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273598 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/client/gles2_implementation.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/gpu/command_buffer/client/gles2_implementation.h b/gpu/command_buffer/client/gles2_implementation.h
index 7404e90..b5ed282 100644
--- a/gpu/command_buffer/client/gles2_implementation.h
+++ b/gpu/command_buffer/client/gles2_implementation.h
@@ -110,6 +110,12 @@ namespace gles2 {
class ImageFactory;
class VertexArrayObjectManager;
+class GLES2ImplementationErrorMessageCallback {
+ public:
+ virtual ~GLES2ImplementationErrorMessageCallback() { }
+ virtual void OnErrorMessage(const char* msg, int id) = 0;
+};
+
// This class emulates GLES2 over command buffers. It can be used by a client
// program so that the program does not need deal with shared memory and command
// buffer management. See gl2_lib.h. Note that there is a performance gain to
@@ -123,11 +129,6 @@ class GLES2_IMPL_EXPORT GLES2Implementation
enum MappedMemoryLimit {
kNoLimit = MappedMemoryManager::kNoLimit,
};
- class ErrorMessageCallback {
- public:
- virtual ~ErrorMessageCallback() { }
- virtual void OnErrorMessage(const char* msg, int id) = 0;
- };
// Stores GL state that never changes.
struct GLES2_IMPL_EXPORT GLStaticState {
@@ -249,7 +250,8 @@ class GLES2_IMPL_EXPORT GLES2Implementation
virtual void SendManagedMemoryStats(const ManagedMemoryStats& stats)
OVERRIDE;
- void SetErrorMessageCallback(ErrorMessageCallback* callback) {
+ void SetErrorMessageCallback(
+ GLES2ImplementationErrorMessageCallback* callback) {
error_message_callback_ = callback;
}
@@ -769,7 +771,7 @@ class GLES2_IMPL_EXPORT GLES2Implementation
scoped_ptr<GpuMemoryBufferTracker> gpu_memory_buffer_tracker_;
- ErrorMessageCallback* error_message_callback_;
+ GLES2ImplementationErrorMessageCallback* error_message_callback_;
scoped_ptr<std::string> current_trace_name_;