| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 namespace o3d { | 40 namespace o3d { |
| 41 | 41 |
| 42 // A DisplayMode describes the size and refresh rate of a display mode; it's | 42 // A DisplayMode describes the size and refresh rate of a display mode; it's |
| 43 // usually used in [or when transitioning into] fullscreen mode. The id is a | 43 // usually used in [or when transitioning into] fullscreen mode. The id is a |
| 44 // platform-specific opaque identifier used to identify the mode when | 44 // platform-specific opaque identifier used to identify the mode when |
| 45 // requesting a fullscreen transition. | 45 // requesting a fullscreen transition. |
| 46 class DisplayMode { | 46 class DisplayMode { |
| 47 public: | 47 public: |
| 48 DisplayMode() | 48 DisplayMode() |
| 49 : valid_(false), | 49 : width_(0), |
| 50 width_(0), | |
| 51 height_(0), | 50 height_(0), |
| 52 refresh_rate_(0), | 51 refresh_rate_(0), |
| 53 id_(-1) { // Since this is platform-specific, -1 may well be valid. | 52 id_(-1), // Since this is platform-specific, -1 may well be valid. |
| 53 valid_(false) { |
| 54 } | 54 } |
| 55 void Set(int w, int h, int r, int i) { | 55 void Set(int w, int h, int r, int i) { |
| 56 width_ = w; | 56 width_ = w; |
| 57 height_ = h; | 57 height_ = h; |
| 58 refresh_rate_ = r; | 58 refresh_rate_ = r; |
| 59 id_ = i; | 59 id_ = i; |
| 60 valid_ = true; | 60 valid_ = true; |
| 61 } | 61 } |
| 62 DisplayMode(int w, int h, int r, int i) { | 62 DisplayMode(int w, int h, int r, int i) { |
| 63 Set(w, h, r, i); | 63 Set(w, h, r, i); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 bool valid_; | 104 bool valid_; |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 } // namespace o3d | 107 } // namespace o3d |
| 108 | 108 |
| 109 #endif // O3D_CORE_CROSS_DISPLAY_MODE_H_ | 109 #endif // O3D_CORE_CROSS_DISPLAY_MODE_H_ |
| 110 | 110 |
| 111 | 111 |
| 112 | 112 |
| 113 | 113 |
| OLD | NEW |