File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,9 +33,8 @@ impeller_component("entity") {
3333 " entity_pass_delegate.h" ,
3434 ]
3535
36- deps = [ " :entity_shaders" ]
37-
3836 public_deps = [
37+ " :entity_shaders" ,
3938 " ../archivist" ,
4039 " ../image" ,
4140 " ../renderer" ,
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ bool Allocator::RequiresExplicitHostSynchronization(StorageMode mode) {
1515 return false ;
1616 }
1717
18- #if OS_IOS
18+ #if FML_OS_IOS
1919 // StorageMode::kHostVisible is MTLStorageModeShared already.
2020 return false ;
2121#else // OS_IOS
Original file line number Diff line number Diff line change 3232static MTLResourceOptions ToMTLResourceOptions (StorageMode type) {
3333 switch (type) {
3434 case StorageMode::kHostVisible :
35- #if OS_IOS
35+ #if FML_OS_IOS
3636 return MTLResourceStorageModeShared ;
3737#else
3838 return MTLResourceStorageModeManaged ;
3939#endif
4040 case StorageMode::kDevicePrivate :
4141 return MTLResourceStorageModePrivate ;
4242 case StorageMode::kDeviceTransient :
43- #if OS_IOS
43+ #if FML_OS_IOS
4444 if (@available (iOS 10.0 , *)) {
4545 return MTLResourceStorageModeMemoryless;
4646 } else {
@@ -57,15 +57,15 @@ static MTLResourceOptions ToMTLResourceOptions(StorageMode type) {
5757static MTLStorageMode ToMTLStorageMode (StorageMode mode) {
5858 switch (mode) {
5959 case StorageMode::kHostVisible :
60- #if OS_IOS
60+ #if FML_OS_IOS
6161 return MTLStorageModeShared ;
6262#else
6363 return MTLStorageModeManaged ;
6464#endif
6565 case StorageMode::kDevicePrivate :
6666 return MTLStorageModePrivate ;
6767 case StorageMode::kDeviceTransient :
68- #if OS_IOS
68+ #if FML_OS_IOS
6969 if (@available (iOS 10.0 , *)) {
7070 return MTLStorageModeMemoryless;
7171 } else {
Original file line number Diff line number Diff line change @@ -275,9 +275,9 @@ constexpr MTLClearColor ToMTLClearColor(const Color& color) {
275275
276276constexpr MTLTextureType ToMTLTextureType (TextureType type) {
277277 switch (type) {
278- case TextureType::k2D :
278+ case TextureType::kTexture2D :
279279 return MTLTextureType2D;
280- case TextureType::k2DMultisample :
280+ case TextureType::kTexture2DMultisample :
281281 return MTLTextureType2DMultisample;
282282 }
283283 return MTLTextureType2D;
Original file line number Diff line number Diff line change 3737 }
3838
3939 TextureDescriptor color0_tex_desc;
40- color0_tex_desc.type = TextureType::k2DMultisample ;
40+ color0_tex_desc.type = TextureType::kTexture2DMultisample ;
4141 color0_tex_desc.sample_count = SampleCount::kCount4 ;
4242 color0_tex_desc.format = color_format;
4343 color0_tex_desc.size = {
6969 color0_resolve_tex_desc, current_drawable.texture );
7070
7171 TextureDescriptor stencil0_tex;
72- stencil0_tex.type = TextureType::k2DMultisample ;
72+ stencil0_tex.type = TextureType::kTexture2DMultisample ;
7373 stencil0_tex.sample_count = SampleCount::kCount4 ;
7474 stencil0_tex.format = PixelFormat::kDefaultStencil ;
7575 stencil0_tex.size = color0_tex_desc.size ;
Original file line number Diff line number Diff line change @@ -25,7 +25,14 @@ class RenderTarget;
2525// / `RenderPass` describes the configuration of the various
2626// / attachments when the command is submitted.
2727// /
28- // / A command buffer is only meant to be used on a single thread.
28+ // / A command buffer is only meant to be used on a single thread. If
29+ // / a frame workload needs to be encoded from multiple threads,
30+ // / setup and record into multiple command buffers. The order of
31+ // / submission of commands encoded in multiple command buffers can
32+ // / be controlled via either the order in which the command buffers
33+ // / were created, or, using the `ReserveSpotInQueue` command which
34+ // / allows for encoding commands for submission in an order that is
35+ // / different from the encoding order.
2936// /
3037class CommandBuffer {
3138 public:
Original file line number Diff line number Diff line change @@ -100,15 +100,15 @@ enum class StoreAction {
100100};
101101
102102enum class TextureType {
103- k2D ,
104- k2DMultisample ,
103+ kTexture2D ,
104+ kTexture2DMultisample ,
105105};
106106
107107constexpr bool IsMultisampleCapable (TextureType type) {
108108 switch (type) {
109- case TextureType::k2D :
109+ case TextureType::kTexture2D :
110110 return false ;
111- case TextureType::k2DMultisample :
111+ case TextureType::kTexture2DMultisample :
112112 return true ;
113113 }
114114 return false ;
Original file line number Diff line number Diff line change 1212namespace impeller {
1313
1414constexpr size_t DefaultUniformAlignment () {
15- #if OS_IOS
15+ #if FML_OS_IOS
1616 return 16u ;
17- #elif OS_MACOSX
17+ #elif FML_OS_MACOSX
1818 return 256u ;
1919#else
2020#error "Unsupported platform".
Original file line number Diff line number Diff line change 1313namespace impeller {
1414
1515struct TextureDescriptor {
16- TextureType type = TextureType::k2D ;
16+ TextureType type = TextureType::kTexture2D ;
1717 PixelFormat format = PixelFormat::kUnknown ;
1818 ISize size;
1919 size_t mip_count = 1u ; // Size::MipCount is usually appropriate.
You can’t perform that action at this time.
0 commit comments