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

Side by Side Diff: ui/gl/init/gl_factory_ozone.cc

Issue 2764853002: gl: Remove redundant methods/variables from GLSurfaceFormat (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « ui/gl/gl_surface_format_unittest.cc ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/init/gl_factory.h" 5 #include "ui/gl/init/gl_factory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "ui/gl/gl_context.h" 9 #include "ui/gl/gl_context.h"
10 #include "ui/gl/gl_context_stub.h" 10 #include "ui/gl/gl_context_stub.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 if (HasGLOzone()) 78 if (HasGLOzone())
79 return GetGLOzone()->CreateSurfacelessViewGLSurface(window); 79 return GetGLOzone()->CreateSurfacelessViewGLSurface(window);
80 80
81 return nullptr; 81 return nullptr;
82 } 82 }
83 83
84 scoped_refptr<GLSurface> CreateOffscreenGLSurfaceWithFormat( 84 scoped_refptr<GLSurface> CreateOffscreenGLSurfaceWithFormat(
85 const gfx::Size& size, GLSurfaceFormat format) { 85 const gfx::Size& size, GLSurfaceFormat format) {
86 TRACE_EVENT0("gpu", "gl::init::CreateOffscreenGLSurface"); 86 TRACE_EVENT0("gpu", "gl::init::CreateOffscreenGLSurface");
87 87
88 if (!format.IsDefault()) {
89 NOTREACHED() << "FATAL: Ozone only supports default-format surfaces.";
90 return nullptr;
91 }
piman 2017/03/22 21:31:36 Is it ok to remove this check? Why?
klausw 2017/03/22 21:49:21 Removing the check is *not* ok, we have a currentl
piman 2017/03/22 21:59:35 Meh. Default-constructing a GLSurfaceFormat on the
Chandan 2017/03/23 12:34:27 Uploaded patch set 2 with format.IsCompatible(GLSu
92
93 if (HasGLOzone()) 88 if (HasGLOzone())
94 return GetGLOzone()->CreateOffscreenGLSurface(size); 89 return GetGLOzone()->CreateOffscreenGLSurface(size);
95 90
96 switch (GetGLImplementation()) { 91 switch (GetGLImplementation()) {
97 case kGLImplementationMockGL: 92 case kGLImplementationMockGL:
98 case kGLImplementationStubGL: 93 case kGLImplementationStubGL:
99 return InitializeGLSurface(new GLSurfaceStub); 94 return InitializeGLSurface(new GLSurfaceStub);
100 default: 95 default:
101 NOTREACHED(); 96 NOTREACHED();
102 } 97 }
103 98
104 return nullptr; 99 return nullptr;
105 } 100 }
106 101
107 } // namespace init 102 } // namespace init
108 } // namespace gl 103 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_format_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698