| Index: gpu/command_buffer/service/gpu_scheduler_linux.cc
|
| diff --git a/gpu/command_buffer/service/gpu_scheduler_linux.cc b/gpu/command_buffer/service/gpu_scheduler_linux.cc
|
| index fcbbd65fcf8d261817910be31f634599d6602b83..9312245a2e00d2a3dc513f67004b3999a714337e 100644
|
| --- a/gpu/command_buffer/service/gpu_scheduler_linux.cc
|
| +++ b/gpu/command_buffer/service/gpu_scheduler_linux.cc
|
| @@ -7,13 +7,6 @@
|
| #include "ui/gfx/gl/gl_share_group.h"
|
| #include "ui/gfx/gl/gl_surface.h"
|
|
|
| -#if defined(TOUCH_UI)
|
| -#include "third_party/angle/include/EGL/egl.h"
|
| -#include "third_party/angle/include/EGL/eglext.h"
|
| -#include "ui/gfx/gl/gl_surface_egl.h"
|
| -#include "ui/gfx/gl/gl_bindings.h"
|
| -#endif
|
| -
|
| using ::base::SharedMemory;
|
|
|
| namespace gpu {
|
| @@ -26,18 +19,18 @@ bool GpuScheduler::Initialize(
|
| const char* allowed_extensions,
|
| const std::vector<int32>& attribs,
|
| gfx::GLShareGroup* share_group) {
|
| +#if defined(TOUCH_UI)
|
| + NOTIMPLEMENTED();
|
| + return false;
|
| +#endif
|
| +
|
| // Create either a view or pbuffer based GLSurface.
|
| scoped_refptr<gfx::GLSurface> surface;
|
| -#if defined(TOUCH_UI)
|
| - surface = gfx::GLSurface::CreateOffscreenGLSurface(software, gfx::Size(1, 1));
|
| -#else
|
| if (window)
|
| surface = gfx::GLSurface::CreateViewGLSurface(software, window);
|
| else
|
| surface = gfx::GLSurface::CreateOffscreenGLSurface(software,
|
| gfx::Size(1, 1));
|
| -#endif
|
| -
|
| if (!surface.get()) {
|
| LOG(ERROR) << "GpuScheduler::Initialize failed.\n";
|
| Destroy();
|
| @@ -66,75 +59,9 @@ void GpuScheduler::Destroy() {
|
| }
|
|
|
| void GpuScheduler::WillSwapBuffers() {
|
| -#if defined(TOUCH_UI)
|
| - front_surface_.swap(back_surface_);
|
| - DCHECK_NE(front_surface_.get(), static_cast<AcceleratedSurface*>(NULL));
|
| -
|
| - gfx::Size expected_size = front_surface_->size();
|
| - if (!back_surface_.get() || back_surface_->size() != expected_size) {
|
| - wrapped_resize_callback_->Run(expected_size);
|
| - } else {
|
| - glFramebufferTexture2DEXT(GL_FRAMEBUFFER,
|
| - GL_COLOR_ATTACHMENT0,
|
| - GL_TEXTURE_2D,
|
| - back_surface_->texture(),
|
| - 0);
|
| - }
|
| - ++swap_buffers_count_;
|
| - glFlush();
|
| -#endif
|
| if (wrapped_swap_buffers_callback_.get()) {
|
| wrapped_swap_buffers_callback_->Run();
|
| }
|
| }
|
|
|
| -#if defined(TOUCH_UI)
|
| -uint64 GpuScheduler::GetBackSurfaceId() {
|
| - if (!back_surface_.get())
|
| - return 0;
|
| - return back_surface_->pixmap();
|
| -}
|
| -
|
| -uint64 GpuScheduler::GetFrontSurfaceId() {
|
| - if (!front_surface_.get())
|
| - return 0;
|
| - return front_surface_->pixmap();
|
| -}
|
| -
|
| -uint64 GpuScheduler::swap_buffers_count() const {
|
| - return swap_buffers_count_;
|
| -}
|
| -
|
| -uint64 GpuScheduler::acknowledged_swap_buffers_count() const {
|
| - return acknowledged_swap_buffers_count_;
|
| -}
|
| -
|
| -void GpuScheduler::set_acknowledged_swap_buffers_count(
|
| - uint64 acknowledged_swap_buffers_count) {
|
| - acknowledged_swap_buffers_count_ = acknowledged_swap_buffers_count;
|
| -}
|
| -
|
| -void GpuScheduler::CreateBackSurface(const gfx::Size& size) {
|
| - decoder()->ResizeOffscreenFrameBuffer(size);
|
| - decoder()->UpdateOffscreenFrameBufferSize();
|
| -
|
| - back_surface_ = new AcceleratedSurface(size);
|
| - surfaces_[back_surface_->pixmap()] = back_surface_;
|
| -
|
| - glFramebufferTexture2DEXT(GL_FRAMEBUFFER,
|
| - GL_COLOR_ATTACHMENT0,
|
| - GL_TEXTURE_2D,
|
| - back_surface_->texture(),
|
| - 0);
|
| - glFlush();
|
| -}
|
| -
|
| -void GpuScheduler::ReleaseSurface(uint64 surface_id) {
|
| - DCHECK_NE(surfaces_[surface_id].get(), back_surface_.get());
|
| - DCHECK_NE(surfaces_[surface_id].get(), front_surface_.get());
|
| - surfaces_.erase(surface_id);
|
| -}
|
| -
|
| -#endif
|
| -
|
| } // namespace gpu
|
|
|