@@ -193,66 +193,66 @@ void ApplySampleCoverage(const gl::State &glState,
193193//
194194// Note: these are mat2's that are appropriately padded (4 floats per row).
195195using PreRotationMatrixValues = std::array<float , 8 >;
196- constexpr angle::PackedEnumMap<rx::SurfaceRotationType ,
196+ constexpr angle::PackedEnumMap<rx::SurfaceRotation ,
197197 PreRotationMatrixValues,
198- angle::EnumSize<rx::SurfaceRotationType >()>
198+ angle::EnumSize<rx::SurfaceRotation >()>
199199 kPreRotationMatrices = {
200- {{rx::SurfaceRotationType ::Identity, {{1 .0f , 0 .0f , 0 .0f , 0 .0f , 0 .0f , 1 .0f , 0 .0f , 0 .0f }}},
201- {rx::SurfaceRotationType ::Rotated90Degrees,
200+ {{rx::SurfaceRotation ::Identity, {{1 .0f , 0 .0f , 0 .0f , 0 .0f , 0 .0f , 1 .0f , 0 .0f , 0 .0f }}},
201+ {rx::SurfaceRotation ::Rotated90Degrees,
202202 {{0 .0f , -1 .0f , 0 .0f , 0 .0f , 1 .0f , 0 .0f , 0 .0f , 0 .0f }}},
203- {rx::SurfaceRotationType ::Rotated180Degrees,
203+ {rx::SurfaceRotation ::Rotated180Degrees,
204204 {{-1 .0f , 0 .0f , 0 .0f , 0 .0f , 0 .0f , -1 .0f , 0 .0f , 0 .0f }}},
205- {rx::SurfaceRotationType ::Rotated270Degrees,
205+ {rx::SurfaceRotation ::Rotated270Degrees,
206206 {{0 .0f , 1 .0f , 0 .0f , 0 .0f , -1 .0f , 0 .0f , 0 .0f , 0 .0f }}},
207- {rx::SurfaceRotationType ::FlippedIdentity,
207+ {rx::SurfaceRotation ::FlippedIdentity,
208208 {{1 .0f , 0 .0f , 0 .0f , 0 .0f , 0 .0f , -1 .0f , 0 .0f , 0 .0f }}},
209- {rx::SurfaceRotationType ::FlippedRotated90Degrees,
209+ {rx::SurfaceRotation ::FlippedRotated90Degrees,
210210 {{0 .0f , -1 .0f , 0 .0f , 0 .0f , -1 .0f , 0 .0f , 0 .0f , 0 .0f }}},
211- {rx::SurfaceRotationType ::FlippedRotated180Degrees,
211+ {rx::SurfaceRotation ::FlippedRotated180Degrees,
212212 {{-1 .0f , 0 .0f , 0 .0f , 0 .0f , 0 .0f , 1 .0f , 0 .0f , 0 .0f }}},
213- {rx::SurfaceRotationType ::FlippedRotated270Degrees,
213+ {rx::SurfaceRotation ::FlippedRotated270Degrees,
214214 {{0 .0f , 1 .0f , 0 .0f , 0 .0f , 1 .0f , 0 .0f , 0 .0f , 0 .0f }}}}};
215215
216- bool IsRotatedAspectRatio (SurfaceRotationType rotation)
216+ bool IsRotatedAspectRatio (SurfaceRotation rotation)
217217{
218- return ((rotation == SurfaceRotationType ::Rotated90Degrees) ||
219- (rotation == SurfaceRotationType ::Rotated270Degrees) ||
220- (rotation == SurfaceRotationType ::FlippedRotated90Degrees) ||
221- (rotation == SurfaceRotationType ::FlippedRotated270Degrees));
218+ return ((rotation == SurfaceRotation ::Rotated90Degrees) ||
219+ (rotation == SurfaceRotation ::Rotated270Degrees) ||
220+ (rotation == SurfaceRotation ::FlippedRotated90Degrees) ||
221+ (rotation == SurfaceRotation ::FlippedRotated270Degrees));
222222}
223223
224- SurfaceRotationType DetermineSurfaceRotation (gl::Framebuffer *framebuffer,
225- WindowSurfaceVk *windowSurface)
224+ SurfaceRotation DetermineSurfaceRotation (gl::Framebuffer *framebuffer,
225+ WindowSurfaceVk *windowSurface)
226226{
227227 if (windowSurface && framebuffer->isDefault ())
228228 {
229229 switch (windowSurface->getPreTransform ())
230230 {
231231 case VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR:
232232 // Do not rotate gl_Position (surface matches the device's orientation):
233- return SurfaceRotationType ::Identity;
233+ return SurfaceRotation ::Identity;
234234 case VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR:
235235 // Rotate gl_Position 90 degrees:
236- return SurfaceRotationType ::Rotated90Degrees;
236+ return SurfaceRotation ::Rotated90Degrees;
237237 case VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR:
238238 // Rotate gl_Position 180 degrees:
239- return SurfaceRotationType ::Rotated180Degrees;
239+ return SurfaceRotation ::Rotated180Degrees;
240240 case VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR:
241241 // Rotate gl_Position 270 degrees:
242- return SurfaceRotationType ::Rotated270Degrees;
242+ return SurfaceRotation ::Rotated270Degrees;
243243 default :
244244 UNREACHABLE ();
245- return SurfaceRotationType ::Identity;
245+ return SurfaceRotation ::Identity;
246246 }
247247 }
248248 else
249249 {
250250 // Do not rotate gl_Position (offscreen framebuffer):
251- return SurfaceRotationType ::Identity;
251+ return SurfaceRotation ::Identity;
252252 }
253253}
254254
255- void RotateRectangle (const SurfaceRotationType rotation,
255+ void RotateRectangle (const SurfaceRotation rotation,
256256 const bool flipY,
257257 const int framebufferWidth,
258258 const int framebufferHeight,
@@ -262,28 +262,28 @@ void RotateRectangle(const SurfaceRotationType rotation,
262262 // GLES's y-axis points up; Vulkan's points down.
263263 switch (rotation)
264264 {
265- case SurfaceRotationType ::Identity:
265+ case SurfaceRotation ::Identity:
266266 // Do not rotate gl_Position (surface matches the device's orientation):
267267 outgoing->x = incoming.x ;
268268 outgoing->y = flipY ? framebufferHeight - incoming.y - incoming.height : incoming.y ;
269269 outgoing->width = incoming.width ;
270270 outgoing->height = incoming.height ;
271271 break ;
272- case SurfaceRotationType ::Rotated90Degrees:
272+ case SurfaceRotation ::Rotated90Degrees:
273273 // Rotate gl_Position 90 degrees:
274274 outgoing->x = incoming.y ;
275275 outgoing->y = flipY ? incoming.x : framebufferWidth - incoming.x - incoming.width ;
276276 outgoing->width = incoming.height ;
277277 outgoing->height = incoming.width ;
278278 break ;
279- case SurfaceRotationType ::Rotated180Degrees:
279+ case SurfaceRotation ::Rotated180Degrees:
280280 // Rotate gl_Position 180 degrees:
281281 outgoing->x = framebufferWidth - incoming.x - incoming.width ;
282282 outgoing->y = flipY ? incoming.y : framebufferHeight - incoming.y - incoming.height ;
283283 outgoing->width = incoming.width ;
284284 outgoing->height = incoming.height ;
285285 break ;
286- case SurfaceRotationType ::Rotated270Degrees:
286+ case SurfaceRotation ::Rotated270Degrees:
287287 // Rotate gl_Position 270 degrees:
288288 outgoing->x = framebufferHeight - incoming.y - incoming.height ;
289289 outgoing->y = flipY ? framebufferWidth - incoming.x - incoming.width : incoming.x ;
@@ -622,8 +622,8 @@ ContextVk::ContextVk(const gl::State &state, gl::ErrorSet *errorSet, RendererVk
622622 mCurrentComputePipeline(nullptr ),
623623 mCurrentDrawMode(gl::PrimitiveMode::InvalidEnum),
624624 mCurrentWindowSurface(nullptr ),
625- mCurrentRotationDrawFramebuffer(SurfaceRotationType ::Identity),
626- mCurrentRotationReadFramebuffer(SurfaceRotationType ::Identity),
625+ mCurrentRotationDrawFramebuffer(SurfaceRotation ::Identity),
626+ mCurrentRotationReadFramebuffer(SurfaceRotation ::Identity),
627627 mVertexArray(nullptr ),
628628 mDrawFramebuffer(nullptr ),
629629 mProgram(nullptr ),
@@ -2422,12 +2422,12 @@ bool ContextVk::isRotatedAspectRatioForReadFBO() const
24222422 return IsRotatedAspectRatio (mCurrentRotationReadFramebuffer );
24232423}
24242424
2425- SurfaceRotationType ContextVk::getRotationDrawFramebuffer () const
2425+ SurfaceRotation ContextVk::getRotationDrawFramebuffer () const
24262426{
24272427 return mCurrentRotationDrawFramebuffer ;
24282428}
24292429
2430- SurfaceRotationType ContextVk::getRotationReadFramebuffer () const
2430+ SurfaceRotation ContextVk::getRotationReadFramebuffer () const
24312431{
24322432 return mCurrentRotationReadFramebuffer ;
24332433}
0 commit comments