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

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

Issue 1545113002: Switch to standard integer types in ui/gl/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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_mac.cc ('k') | ui/gl/gl_surface_osmesa.cc » ('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 #ifndef UI_GL_GL_SURFACE_OSMESA_H_ 5 #ifndef UI_GL_GL_SURFACE_OSMESA_H_
6 #define UI_GL_GL_SURFACE_OSMESA_H_ 6 #define UI_GL_GL_SURFACE_OSMESA_H_
7 7
8 #include <stdint.h>
9
10 #include "base/macros.h"
8 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
9 #include "ui/gfx/geometry/size.h" 12 #include "ui/gfx/geometry/size.h"
10 #include "ui/gl/gl_surface.h" 13 #include "ui/gl/gl_surface.h"
11 14
12 namespace gfx { 15 namespace gfx {
13 16
14 enum OSMesaSurfaceFormat { OSMesaSurfaceFormatBGRA, OSMesaSurfaceFormatRGBA }; 17 enum OSMesaSurfaceFormat { OSMesaSurfaceFormatBGRA, OSMesaSurfaceFormatRGBA };
15 18
16 // A surface that the Mesa software renderer draws to. This is actually just a 19 // A surface that the Mesa software renderer draws to. This is actually just a
17 // buffer in system memory. GetHandle returns a pointer to the buffer. These 20 // buffer in system memory. GetHandle returns a pointer to the buffer. These
(...skipping 13 matching lines...) Expand all
31 gfx::Size GetSize() override; 34 gfx::Size GetSize() override;
32 void* GetHandle() override; 35 void* GetHandle() override;
33 unsigned GetFormat() override; 36 unsigned GetFormat() override;
34 37
35 protected: 38 protected:
36 ~GLSurfaceOSMesa() override; 39 ~GLSurfaceOSMesa() override;
37 40
38 private: 41 private:
39 unsigned format_; 42 unsigned format_;
40 gfx::Size size_; 43 gfx::Size size_;
41 scoped_ptr<int32[]> buffer_; 44 scoped_ptr<int32_t[]> buffer_;
42 45
43 DISALLOW_COPY_AND_ASSIGN(GLSurfaceOSMesa); 46 DISALLOW_COPY_AND_ASSIGN(GLSurfaceOSMesa);
44 }; 47 };
45 48
46 // A thin subclass of |GLSurfaceOSMesa| that can be used in place 49 // A thin subclass of |GLSurfaceOSMesa| that can be used in place
47 // of a native hardware-provided surface when a native surface 50 // of a native hardware-provided surface when a native surface
48 // provider is not available. 51 // provider is not available.
49 class GLSurfaceOSMesaHeadless : public GLSurfaceOSMesa { 52 class GLSurfaceOSMesaHeadless : public GLSurfaceOSMesa {
50 public: 53 public:
51 explicit GLSurfaceOSMesaHeadless(); 54 explicit GLSurfaceOSMesaHeadless();
52 55
53 bool IsOffscreen() override; 56 bool IsOffscreen() override;
54 gfx::SwapResult SwapBuffers() override; 57 gfx::SwapResult SwapBuffers() override;
55 58
56 protected: 59 protected:
57 ~GLSurfaceOSMesaHeadless() override; 60 ~GLSurfaceOSMesaHeadless() override;
58 61
59 private: 62 private:
60 DISALLOW_COPY_AND_ASSIGN(GLSurfaceOSMesaHeadless); 63 DISALLOW_COPY_AND_ASSIGN(GLSurfaceOSMesaHeadless);
61 }; 64 };
62 65
63 } // namespace gfx 66 } // namespace gfx
64 67
65 #endif // UI_GL_GL_SURFACE_OSMESA_H_ 68 #endif // UI_GL_GL_SURFACE_OSMESA_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_mac.cc ('k') | ui/gl/gl_surface_osmesa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698