summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/service/gpu_processor.h
diff options
context:
space:
mode:
authorapatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-24 21:17:43 +0000
committerapatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-24 21:17:43 +0000
commita7150972720d10eb13ec1461dcdd0836b86b2586 (patch)
tree89b3e5485df9d1baa4718ae3c5a76583af566f04 /gpu/command_buffer/service/gpu_processor.h
parenteba9677e3ca98f6b968f1c5050141bf7b95d5421 (diff)
downloadchromium_src-a7150972720d10eb13ec1461dcdd0836b86b2586.zip
chromium_src-a7150972720d10eb13ec1461dcdd0836b86b2586.tar.gz
chromium_src-a7150972720d10eb13ec1461dcdd0836b86b2586.tar.bz2
Reverting the rest of 32952
TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32970 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/service/gpu_processor.h')
-rw-r--r--gpu/command_buffer/service/gpu_processor.h99
1 files changed, 0 insertions, 99 deletions
diff --git a/gpu/command_buffer/service/gpu_processor.h b/gpu/command_buffer/service/gpu_processor.h
deleted file mode 100644
index 786e504..0000000
--- a/gpu/command_buffer/service/gpu_processor.h
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright (c) 2006-2008 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 GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_
-#define GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_
-
-#include "base/ref_counted.h"
-#include "base/scoped_ptr.h"
-#include "base/shared_memory.h"
-#include "gpu/command_buffer/common/command_buffer.h"
-#include "gpu/command_buffer/service/cmd_buffer_engine.h"
-#include "gpu/command_buffer/service/cmd_parser.h"
-#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
-#include "gpu/np_utils/np_object_pointer.h"
-
-namespace command_buffer {
-
-// This class processes commands in a command buffer. It is event driven and
-// posts tasks to the current message loop to do additional work.
-class GPUProcessor : public ::base::RefCounted<GPUProcessor>,
- public command_buffer::CommandBufferEngine {
- public:
- GPUProcessor(NPP npp, CommandBuffer* command_buffer);
-
- // This constructor is for unit tests.
- GPUProcessor(CommandBuffer* command_buffer,
- gles2::GLES2Decoder* decoder,
- CommandParser* parser,
- int commands_per_update);
-
- virtual bool Initialize(HWND hwnd);
-
- virtual ~GPUProcessor();
-
- virtual void Destroy();
-
- virtual void ProcessCommands();
-
-#if defined(OS_WIN)
- virtual bool SetWindow(HWND handle, int width, int height);
-#endif
-
- // Implementation of CommandBufferEngine.
-
- // Gets the base address of a registered shared memory buffer.
- // Parameters:
- // shm_id: the identifier for the shared memory buffer.
- virtual void *GetSharedMemoryAddress(int32 shm_id);
-
- // Gets the size of a registered shared memory buffer.
- // Parameters:
- // shm_id: the identifier for the shared memory buffer.
- virtual size_t GetSharedMemorySize(int32 shm_id);
-
- // Sets the token value.
- virtual void set_token(int32 token);
-
- private:
- NPP npp_;
-
- // The GPUProcessor holds a weak reference to the CommandBuffer. The
- // CommandBuffer owns the GPUProcessor and holds a strong reference to it
- // through the ProcessCommands callback.
- CommandBuffer* command_buffer_;
-
- scoped_ptr< ::base::SharedMemory> mapped_ring_buffer_;
- int commands_per_update_;
-
- scoped_ptr<gles2::GLES2Decoder> decoder_;
- scoped_ptr<CommandParser> parser_;
-};
-
-} // namespace command_buffer
-
-// Callbacks to the GPUProcessor hold a reference count.
-template <typename Method>
-class CallbackStorage<command_buffer::GPUProcessor, Method> {
- public:
- CallbackStorage(command_buffer::GPUProcessor* obj, Method method)
- : obj_(obj),
- meth_(method) {
- DCHECK(obj_);
- obj_->AddRef();
- }
-
- ~CallbackStorage() {
- obj_->Release();
- }
-
- protected:
- command_buffer::GPUProcessor* obj_;
- Method meth_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CallbackStorage);
-};
-
-#endif // GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_