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

Unified Diff: ui/gl/gl_surface_ozone.cc

Issue 1420503011: GLES2CmdDecoder should resize GLSurface using GLSurface::Resize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « ui/gl/gl_surface_osmesa.cc ('k') | ui/gl/gl_surface_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_ozone.cc
diff --git a/ui/gl/gl_surface_ozone.cc b/ui/gl/gl_surface_ozone.cc
index 377597d7efb3a14ffceb4c6f73ddf2105b751de3..fb12b9a2e22a832e85105bcc8e7d693f1ac53e2d 100644
--- a/ui/gl/gl_surface_ozone.cc
+++ b/ui/gl/gl_surface_ozone.cc
@@ -44,7 +44,7 @@ class GL_EXPORT GLSurfaceOzoneEGL : public NativeViewGLSurfaceEGL {
// GLSurface:
bool Initialize() override;
- bool Resize(const gfx::Size& size) override;
+ bool Resize(const gfx::Size& size, float scale_factor) override;
gfx::SwapResult SwapBuffers() override;
bool ScheduleOverlayPlane(int z_order,
OverlayTransform transform,
@@ -77,14 +77,14 @@ bool GLSurfaceOzoneEGL::Initialize() {
return Initialize(ozone_surface_->CreateVSyncProvider());
}
-bool GLSurfaceOzoneEGL::Resize(const gfx::Size& size) {
+bool GLSurfaceOzoneEGL::Resize(const gfx::Size& size, float scale_factor) {
if (!ozone_surface_->ResizeNativeWindow(size)) {
if (!ReinitializeNativeSurface() ||
!ozone_surface_->ResizeNativeWindow(size))
return false;
}
- return NativeViewGLSurfaceEGL::Resize(size);
+ return NativeViewGLSurfaceEGL::Resize(size, scale_factor);
}
gfx::SwapResult GLSurfaceOzoneEGL::SwapBuffers() {
@@ -142,7 +142,7 @@ class GL_EXPORT GLSurfaceOzoneSurfaceless : public SurfacelessEGL {
// GLSurface:
bool Initialize() override;
- bool Resize(const gfx::Size& size) override;
+ bool Resize(const gfx::Size& size, float scale_factor) override;
gfx::SwapResult SwapBuffers() override;
bool ScheduleOverlayPlane(int z_order,
OverlayTransform transform,
@@ -261,11 +261,12 @@ bool GLSurfaceOzoneSurfaceless::Initialize() {
return true;
}
-bool GLSurfaceOzoneSurfaceless::Resize(const gfx::Size& size) {
+bool GLSurfaceOzoneSurfaceless::Resize(const gfx::Size& size,
+ float scale_factor) {
if (!ozone_surface_->ResizeNativeWindow(size))
return false;
- return SurfacelessEGL::Resize(size);
+ return SurfacelessEGL::Resize(size, scale_factor);
}
gfx::SwapResult GLSurfaceOzoneSurfaceless::SwapBuffers() {
@@ -426,7 +427,7 @@ class GL_EXPORT GLSurfaceOzoneSurfacelessSurfaceImpl
// GLSurface:
unsigned int GetBackingFrameBufferObject() override;
bool OnMakeCurrent(GLContext* context) override;
- bool Resize(const gfx::Size& size) override;
+ bool Resize(const gfx::Size& size, float scale_factor) override;
bool SupportsPostSubBuffer() override;
gfx::SwapResult SwapBuffers() override;
bool SwapBuffersAsync(const SwapCompletionCallback& callback) override;
@@ -479,10 +480,12 @@ bool GLSurfaceOzoneSurfacelessSurfaceImpl::OnMakeCurrent(GLContext* context) {
return SurfacelessEGL::OnMakeCurrent(context);
}
-bool GLSurfaceOzoneSurfacelessSurfaceImpl::Resize(const gfx::Size& size) {
+bool GLSurfaceOzoneSurfacelessSurfaceImpl::Resize(const gfx::Size& size,
+ float scale_factor) {
if (size == GetSize())
return true;
- return GLSurfaceOzoneSurfaceless::Resize(size) && CreatePixmaps();
+ return GLSurfaceOzoneSurfaceless::Resize(size, scale_factor) &&
+ CreatePixmaps();
}
bool GLSurfaceOzoneSurfacelessSurfaceImpl::SupportsPostSubBuffer() {
« no previous file with comments | « ui/gl/gl_surface_osmesa.cc ('k') | ui/gl/gl_surface_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698