Flutter Impeller
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 318 of file content_context.h.

Member Function Documentation

◆ operator()()

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

Definition at line 319 of file content_context.h.

319  {
320  static_assert(sizeof(o.sample_count) == 1);
321  static_assert(sizeof(o.blend_mode) == 1);
322  static_assert(sizeof(o.sample_count) == 1);
323  static_assert(sizeof(o.depth_compare) == 1);
324  static_assert(sizeof(o.stencil_mode) == 1);
325  static_assert(sizeof(o.primitive_type) == 1);
326  static_assert(sizeof(o.color_attachment_pixel_format) == 1);
327 
328  return (o.is_for_rrect_blur_clear ? 1llu : 0llu) << 0 |
329  (o.wireframe ? 1llu : 0llu) << 1 |
330  (o.has_depth_stencil_attachments ? 1llu : 0llu) << 2 |
331  (o.depth_write_enabled ? 1llu : 0llu) << 3 |
332  // enums
333  static_cast<uint64_t>(o.color_attachment_pixel_format) << 8 |
334  static_cast<uint64_t>(o.primitive_type) << 16 |
335  static_cast<uint64_t>(o.stencil_mode) << 24 |
336  static_cast<uint64_t>(o.depth_compare) << 32 |
337  static_cast<uint64_t>(o.blend_mode) << 40 |
338  static_cast<uint64_t>(o.sample_count) << 48;
339  }

References impeller::ContentContextOptions::blend_mode, impeller::ContentContextOptions::color_attachment_pixel_format, impeller::ContentContextOptions::depth_compare, impeller::ContentContextOptions::depth_write_enabled, impeller::ContentContextOptions::has_depth_stencil_attachments, impeller::ContentContextOptions::is_for_rrect_blur_clear, impeller::ContentContextOptions::primitive_type, impeller::ContentContextOptions::sample_count, impeller::ContentContextOptions::stencil_mode, and impeller::ContentContextOptions::wireframe.


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