Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 1b6ca20

Browse files
committed
Rename constants
1 parent bc34af8 commit 1b6ca20

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

shell/platform/darwin/macos/framework/Source/FlutterSurfaceManager.mm

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
#import "flutter/shell/platform/darwin/macos/framework/Source/MacOSGLContextSwitch.h"
99

1010
enum {
11-
kFront = 0,
12-
kBack = 1,
11+
kFrontBuffer = 0,
12+
kBackBuffer = 1,
1313
kBufferCount,
1414
};
1515

@@ -109,15 +109,15 @@ - (void)swapBuffers {
109109
// The surface is an OpenGL texture, which means it has origin in bottom left corner
110110
// and needs to be flipped vertically
111111
_contentLayer.transform = CATransform3DMakeScale(1, -1, 1);
112-
[_contentLayer setContents:(__bridge id)_ioSurface[kBack]];
112+
[_contentLayer setContents:(__bridge id)_ioSurface[kBackBuffer]];
113113

114-
std::swap(_ioSurface[kBack], _ioSurface[kFront]);
115-
std::swap(_frameBufferId[kBack], _frameBufferId[kFront]);
116-
std::swap(_backingTexture[kBack], _backingTexture[kFront]);
114+
std::swap(_ioSurface[kBackBuffer], _ioSurface[kFrontBuffer]);
115+
std::swap(_frameBufferId[kBackBuffer], _frameBufferId[kFrontBuffer]);
116+
std::swap(_backingTexture[kBackBuffer], _backingTexture[kFrontBuffer]);
117117
}
118118

119119
- (uint32_t)glFrameBufferId {
120-
return _frameBufferId[kBack];
120+
return _frameBufferId[kBackBuffer];
121121
}
122122

123123
- (void)dealloc {

0 commit comments

Comments
 (0)