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

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

Issue 1445003002: Use std::default_delete as the default deleter for scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: How many trial and errors before this builds on the Windows bots Created 5 years, 1 month 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/gfx/image/image_util.cc ('k') | ui/gl/gpu_timing.h » ('j') | 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_osmesa.h"
6
7 #include <algorithm>
8
5 #include "base/logging.h" 9 #include "base/logging.h"
6 #include "base/numerics/safe_math.h" 10 #include "base/numerics/safe_math.h"
7 #include "third_party/mesa/src/include/GL/osmesa.h" 11 #include "third_party/mesa/src/include/GL/osmesa.h"
8 #include "ui/gl/gl_bindings.h" 12 #include "ui/gl/gl_bindings.h"
9 #include "ui/gl/gl_context.h" 13 #include "ui/gl/gl_context.h"
10 #include "ui/gl/gl_surface_osmesa.h"
11 #include "ui/gl/scoped_make_current.h" 14 #include "ui/gl/scoped_make_current.h"
12 15
13 namespace gfx { 16 namespace gfx {
14 17
15 GLSurfaceOSMesa::GLSurfaceOSMesa(OSMesaSurfaceFormat format, 18 GLSurfaceOSMesa::GLSurfaceOSMesa(OSMesaSurfaceFormat format,
16 const gfx::Size& size) 19 const gfx::Size& size)
17 : size_(size) { 20 : size_(size) {
18 switch (format) { 21 switch (format) {
19 case OSMesaSurfaceFormatBGRA: 22 case OSMesaSurfaceFormatBGRA:
20 format_ = OSMESA_BGRA; 23 format_ = OSMESA_BGRA;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 return gfx::SwapResult::SWAP_ACK; 114 return gfx::SwapResult::SWAP_ACK;
112 } 115 }
113 116
114 GLSurfaceOSMesaHeadless::GLSurfaceOSMesaHeadless() 117 GLSurfaceOSMesaHeadless::GLSurfaceOSMesaHeadless()
115 : GLSurfaceOSMesa(OSMesaSurfaceFormatBGRA, gfx::Size(1, 1)) { 118 : GLSurfaceOSMesa(OSMesaSurfaceFormatBGRA, gfx::Size(1, 1)) {
116 } 119 }
117 120
118 GLSurfaceOSMesaHeadless::~GLSurfaceOSMesaHeadless() { Destroy(); } 121 GLSurfaceOSMesaHeadless::~GLSurfaceOSMesaHeadless() { Destroy(); }
119 122
120 } // namespace gfx 123 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/image/image_util.cc ('k') | ui/gl/gpu_timing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698