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

Side by Side Diff: ui/gl/gl_surface_egl.cc

Issue 10836300: Override Resize() in NativeViewGLSurfaceEGL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gl/gl_surface_egl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gl/gl_surface_egl.h" 5 #include "ui/gl/gl_surface_egl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 if (!eglQuerySurface(GetDisplay(), surface_, EGL_WIDTH, &width) || 331 if (!eglQuerySurface(GetDisplay(), surface_, EGL_WIDTH, &width) ||
332 !eglQuerySurface(GetDisplay(), surface_, EGL_HEIGHT, &height)) { 332 !eglQuerySurface(GetDisplay(), surface_, EGL_HEIGHT, &height)) {
333 NOTREACHED() << "eglQuerySurface failed with error " 333 NOTREACHED() << "eglQuerySurface failed with error "
334 << GetLastEGLErrorString(); 334 << GetLastEGLErrorString();
335 return gfx::Size(); 335 return gfx::Size();
336 } 336 }
337 337
338 return gfx::Size(width, height); 338 return gfx::Size(width, height);
339 } 339 }
340 340
341 bool NativeViewGLSurfaceEGL::Resize(const gfx::Size& size) {
342 return size == GetSize();
343 }
344
341 EGLSurface NativeViewGLSurfaceEGL::GetHandle() { 345 EGLSurface NativeViewGLSurfaceEGL::GetHandle() {
342 return surface_; 346 return surface_;
343 } 347 }
344 348
345 std::string NativeViewGLSurfaceEGL::GetExtensions() { 349 std::string NativeViewGLSurfaceEGL::GetExtensions() {
346 std::string extensions = GLSurface::GetExtensions(); 350 std::string extensions = GLSurface::GetExtensions();
347 if (supports_post_sub_buffer_) { 351 if (supports_post_sub_buffer_) {
348 extensions += extensions.empty() ? "" : " "; 352 extensions += extensions.empty() ? "" : " ";
349 extensions += "GL_CHROMIUM_post_sub_buffer"; 353 extensions += "GL_CHROMIUM_post_sub_buffer";
350 } 354 }
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 489
486 return handle; 490 return handle;
487 #endif 491 #endif
488 } 492 }
489 493
490 PbufferGLSurfaceEGL::~PbufferGLSurfaceEGL() { 494 PbufferGLSurfaceEGL::~PbufferGLSurfaceEGL() {
491 Destroy(); 495 Destroy();
492 } 496 }
493 497
494 } // namespace gfx 498 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_egl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698