Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
impeller::ContentContextOptions::Hash Struct Reference

#include <content_context.h>

Public Member Functions

constexpr uint64_t operator() (const ContentContextOptions &o) const
 

Detailed Description

Definition at line 327 of file content_context.h.

Member Function Documentation

◆ operator()()

constexpr uint64_t impeller::ContentContextOptions::Hash::operator() ( const ContentContextOptions o) const
inlineconstexpr

Definition at line 328 of file content_context.h.

328 {
329 static_assert(sizeof(o.sample_count) == 1);
330 static_assert(sizeof(o.blend_mode) == 1);
331 static_assert(sizeof(o.sample_count) == 1);
332 static_assert(sizeof(o.depth_compare) == 1);
333 static_assert(sizeof(o.stencil_mode) == 1);
334 static_assert(sizeof(o.primitive_type) == 1);
335 static_assert(sizeof(o.color_attachment_pixel_format) == 1);
336
337 return (o.is_for_rrect_blur_clear ? 1llu : 0llu) << 0 |
338 (o.wireframe ? 1llu : 0llu) << 1 |
339 (o.has_depth_stencil_attachments ? 1llu : 0llu) << 2 |
340 (o.depth_write_enabled ? 1llu : 0llu) << 3 |
341 // enums
342 static_cast<uint64_t>(o.color_attachment_pixel_format) << 8 |
343 static_cast<uint64_t>(o.primitive_type) << 16 |
344 static_cast<uint64_t>(o.stencil_mode) << 24 |
345 static_cast<uint64_t>(o.depth_compare) << 32 |
346 static_cast<uint64_t>(o.blend_mode) << 40 |
347 static_cast<uint64_t>(o.sample_count) << 48;
348 }

The documentation for this struct was generated from the following file: