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

Unified Diff: gpu/command_buffer/service/gpu_scheduler_linux.cc

Issue 7395020: Create new GLSurface for cross process image transport. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "" Created 9 years, 5 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
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 1c6c8e9654ded39a9f756a53efb39cbd8ef85d64..52e792a8fa2328ce22ead0ff2aeb7fb701a93834 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 {
@@ -25,16 +18,17 @@ 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(gfx::Size(1, 1));
-#else
if (window)
surface = gfx::GLSurface::CreateViewGLSurface(window);
else
surface = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1));
-#endif
if (!surface.get()) {
LOG(ERROR) << "GpuScheduler::Initialize failed.\n";
@@ -64,75 +58,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

Powered by Google App Engine
This is Rietveld 408576698