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

Unified Diff: mojo/gles2/command_buffer_client_impl.cc

Issue 1189833005: Revert of Support impl-side painting in Mandoline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | « mojo/gles2/command_buffer_client_impl.h ('k') | mojo/gles2/gles2_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/gles2/command_buffer_client_impl.cc
diff --git a/mojo/gles2/command_buffer_client_impl.cc b/mojo/gles2/command_buffer_client_impl.cc
index 72d1f5d6f96f7e67fb4e22ed333221b2d12a9f7b..97ea89a4e3481282c121ad7159e2d7aa4328f3ed 100644
--- a/mojo/gles2/command_buffer_client_impl.cc
+++ b/mojo/gles2/command_buffer_client_impl.cc
@@ -10,9 +10,6 @@
#include "base/process/process_handle.h"
#include "components/view_manager/gles2/command_buffer_type_conversions.h"
#include "components/view_manager/gles2/mojo_buffer_backing.h"
-#include "components/view_manager/gles2/mojo_gpu_memory_buffer.h"
-#include "gpu/command_buffer/service/image_factory.h"
-#include "mojo/platform_handle/platform_handle_functions.h"
namespace gles2 {
@@ -123,7 +120,6 @@
shared_state_(NULL),
last_put_offset_(-1),
next_transfer_buffer_id_(0),
- next_image_id_(0),
async_waiter_(async_waiter) {
command_buffer_.Bind(mojo::InterfacePtrInfo<mojo::CommandBuffer>(
command_buffer_handle.Pass(), 0u),
@@ -249,59 +245,14 @@
size_t width,
size_t height,
unsigned internalformat) {
- int32 new_id = ++next_image_id_;
-
- mojo::SizePtr size = mojo::Size::New();
- size->width = width;
- size->height = height;
-
- MojoGpuMemoryBufferImpl* gpu_memory_buffer =
- MojoGpuMemoryBufferImpl::FromClientBuffer(buffer);
- gfx::GpuMemoryBufferHandle handle = gpu_memory_buffer->GetHandle();
-
- bool requires_sync_point = false;
- base::SharedMemoryHandle dupd_handle =
- base::SharedMemory::DuplicateHandle(handle.handle);
-#if defined(OS_WIN)
- HANDLE platform_handle = dupd_handle;
-#else
- int platform_handle = dupd_handle.fd;
-#endif
-
- if (handle.type != gfx::SHARED_MEMORY_BUFFER) {
- requires_sync_point = true;
- NOTIMPLEMENTED();
- return -1;
- }
-
- MojoHandle mojo_handle = MOJO_HANDLE_INVALID;
- MojoResult create_result = MojoCreatePlatformHandleWrapper(
- platform_handle, &mojo_handle);
- if (create_result != MOJO_RESULT_OK) {
- NOTIMPLEMENTED();
- return -1;
- }
- mojo::ScopedHandle scoped_handle;
- scoped_handle.reset(mojo::Handle(mojo_handle));
- command_buffer_->CreateImage(new_id,
- scoped_handle.Pass(),
- handle.type,
- size.Pass(),
- gpu_memory_buffer->GetFormat(),
- internalformat);
- if (requires_sync_point) {
- NOTIMPLEMENTED();
- // TODO(jam): need to support this if we support types other than
- // SHARED_MEMORY_BUFFER.
- //gpu_memory_buffer_manager->SetDestructionSyncPoint(gpu_memory_buffer,
- // InsertSyncPoint());
- }
-
- return new_id;
+ // TODO(piman)
+ NOTIMPLEMENTED();
+ return -1;
}
void CommandBufferClientImpl::DestroyImage(int32 id) {
- command_buffer_->DestroyImage(id);
+ // TODO(piman)
+ NOTIMPLEMENTED();
}
int32_t CommandBufferClientImpl::CreateGpuMemoryBufferImage(
@@ -309,14 +260,9 @@
size_t height,
unsigned internalformat,
unsigned usage) {
- scoped_ptr<gfx::GpuMemoryBuffer> buffer(MojoGpuMemoryBufferImpl::Create(
- gfx::Size(width, height),
- gpu::ImageFactory::ImageFormatToGpuMemoryBufferFormat(internalformat),
- gpu::ImageFactory::ImageUsageToGpuMemoryBufferUsage(usage)));
- if (!buffer)
- return -1;
-
- return CreateImage(buffer->AsClientBuffer(), width, height, internalformat);
+ // TODO(piman)
+ NOTIMPLEMENTED();
+ return -1;
}
uint32_t CommandBufferClientImpl::InsertSyncPoint() {
« no previous file with comments | « mojo/gles2/command_buffer_client_impl.h ('k') | mojo/gles2/gles2_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698