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 344 of file content_context.h.

Member Function Documentation

◆ operator()()

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

Definition at line 345 of file content_context.h.

345  {
346  static_assert(sizeof(o.sample_count) == 1);
347  static_assert(sizeof(o.blend_mode) == 1);
348  static_assert(sizeof(o.sample_count) == 1);
349  static_assert(sizeof(o.depth_compare) == 1);
350  static_assert(sizeof(o.stencil_mode) == 1);
351  static_assert(sizeof(o.primitive_type) == 1);
352  static_assert(sizeof(o.color_attachment_pixel_format) == 1);
353 
354  return (o.is_for_rrect_blur_clear ? 1llu : 0llu) << 0 |
355  (o.wireframe ? 1llu : 0llu) << 1 |
356  (o.has_depth_stencil_attachments ? 1llu : 0llu) << 2 |
357  (o.depth_write_enabled ? 1llu : 0llu) << 3 |
358  // enums
359  static_cast<uint64_t>(o.color_attachment_pixel_format) << 8 |
360  static_cast<uint64_t>(o.primitive_type) << 16 |
361  static_cast<uint64_t>(o.stencil_mode) << 24 |
362  static_cast<uint64_t>(o.depth_compare) << 32 |
363  static_cast<uint64_t>(o.blend_mode) << 40 |
364  static_cast<uint64_t>(o.sample_count) << 48;
365  }

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: