| Index: ui/gl/gl_image_memory.cc
|
| diff --git a/ui/gl/gl_image_memory.cc b/ui/gl/gl_image_memory.cc
|
| index f99dce59fdbfe0dbf0bcb2f85a6c2e67ddc3892a..6c18247505910c00598e9575b69861f5bdedab98 100644
|
| --- a/ui/gl/gl_image_memory.cc
|
| +++ b/ui/gl/gl_image_memory.cc
|
| @@ -12,7 +12,9 @@
|
| #include "ui/gfx/buffer_format_util.h"
|
| #include "ui/gl/gl_bindings.h"
|
| #include "ui/gl/gl_context.h"
|
| +#include "ui/gl/gl_fence.h"
|
| #include "ui/gl/gl_version_info.h"
|
| +#include "ui/gl/scoped_binders.h"
|
|
|
| using gfx::BufferFormat;
|
|
|
| @@ -488,6 +490,35 @@ bool GLImageMemory::CopyTexSubImage(unsigned target,
|
| return true;
|
| }
|
|
|
| +bool GLImageMemory::CopySubImageData(unsigned texture_id,
|
| + const gfx::Point& offset,
|
| + const gfx::Rect& rect,
|
| + GLFence* in_fence,
|
| + GLFence* out_fence) {
|
| + TRACE_EVENT2("gpu", "GLImageMemory::CopySubImageData", "width", rect.width(),
|
| + "height", rect.height());
|
| +
|
| + // Output fence must have support for client side signaling.
|
| + if (out_fence && !out_fence->SignalSupported())
|
| + return false;
|
| +
|
| + if (in_fence)
|
| + in_fence->ClientWait();
|
| +
|
| + {
|
| + ScopedTextureBinder texture_binder(GL_TEXTURE_2D, texture_id);
|
| +
|
| + bool rv = CopyTexSubImage(GL_TEXTURE_2D, offset, rect);
|
| + if (!rv)
|
| + return false;
|
| + }
|
| +
|
| + if (out_fence)
|
| + out_fence->Signal();
|
| +
|
| + return true;
|
| +}
|
| +
|
| bool GLImageMemory::ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
|
| int z_order,
|
| gfx::OverlayTransform transform,
|
|
|