Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
flutter::LayerStateStack::MutatorContext Class Reference

#include <layer_state_stack.h>

Public Member Functions

 ~MutatorContext ()
 
void saveLayer (const SkRect &bounds)
 
void applyOpacity (const SkRect &bounds, SkScalar opacity)
 
void applyImageFilter (const SkRect &bounds, const std::shared_ptr< const DlImageFilter > &filter)
 
void applyColorFilter (const SkRect &bounds, const std::shared_ptr< const DlColorFilter > &filter)
 
void applyBackdropFilter (const SkRect &bounds, const std::shared_ptr< const DlImageFilter > &filter, DlBlendMode blend_mode)
 
void translate (SkScalar tx, SkScalar ty)
 
void translate (SkPoint tp)
 
void transform (const SkM44 &m44)
 
void transform (const SkMatrix &matrix)
 
void integralTransform ()
 
void clipRect (const SkRect &rect, bool is_aa)
 
void clipRRect (const SkRRect &rrect, bool is_aa)
 
void clipPath (const SkPath &path, bool is_aa)
 

Friends

class LayerStateStack
 

Detailed Description

Definition at line 163 of file layer_state_stack.h.

Constructor & Destructor Documentation

◆ ~MutatorContext()

flutter::LayerStateStack::MutatorContext::~MutatorContext ( )
inline

Definition at line 165 of file layer_state_stack.h.

165 {
166 layer_state_stack_->restore_to_count(stack_restore_count_);
167 }

Member Function Documentation

◆ applyBackdropFilter()

void flutter::MutatorContext::applyBackdropFilter ( const SkRect bounds,
const std::shared_ptr< const DlImageFilter > &  filter,
DlBlendMode  blend_mode 
)

Definition at line 562 of file layer_state_stack.cc.

565 {
566 layer_state_stack_->push_backdrop(bounds, filter, blend_mode);
567}

◆ applyColorFilter()

void flutter::MutatorContext::applyColorFilter ( const SkRect bounds,
const std::shared_ptr< const DlColorFilter > &  filter 
)

Definition at line 554 of file layer_state_stack.cc.

556 {
557 if (filter) {
558 layer_state_stack_->push_color_filter(bounds, filter);
559 }
560}

◆ applyImageFilter()

void flutter::MutatorContext::applyImageFilter ( const SkRect bounds,
const std::shared_ptr< const DlImageFilter > &  filter 
)

Definition at line 546 of file layer_state_stack.cc.

548 {
549 if (filter) {
550 layer_state_stack_->push_image_filter(bounds, filter);
551 }
552}

◆ applyOpacity()

void flutter::MutatorContext::applyOpacity ( const SkRect bounds,
SkScalar  opacity 
)

Definition at line 540 of file layer_state_stack.cc.

540 {
541 if (opacity < SK_Scalar1) {
542 layer_state_stack_->push_opacity(bounds, opacity);
543 }
544}
#define SK_Scalar1
Definition SkScalar.h:18

◆ clipPath()

void flutter::MutatorContext::clipPath ( const SkPath path,
bool  is_aa 
)

Definition at line 615 of file layer_state_stack.cc.

615 {
616 layer_state_stack_->maybe_save_layer_for_clip(save_needed_);
617 save_needed_ = false;
618 layer_state_stack_->push_clip_path(path, is_aa);
619}
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition switches.h:57

◆ clipRect()

void flutter::MutatorContext::clipRect ( const SkRect rect,
bool  is_aa 
)

Definition at line 603 of file layer_state_stack.cc.

603 {
604 layer_state_stack_->maybe_save_layer_for_clip(save_needed_);
605 save_needed_ = false;
606 layer_state_stack_->push_clip_rect(rect, is_aa);
607}

◆ clipRRect()

void flutter::MutatorContext::clipRRect ( const SkRRect rrect,
bool  is_aa 
)

Definition at line 609 of file layer_state_stack.cc.

609 {
610 layer_state_stack_->maybe_save_layer_for_clip(save_needed_);
611 save_needed_ = false;
612 layer_state_stack_->push_clip_rrect(rrect, is_aa);
613}

◆ integralTransform()

void flutter::MutatorContext::integralTransform ( )

Definition at line 597 of file layer_state_stack.cc.

597 {
598 layer_state_stack_->maybe_save_layer_for_transform(save_needed_);
599 save_needed_ = false;
600 layer_state_stack_->push_integral_transform();
601}

◆ saveLayer()

void flutter::MutatorContext::saveLayer ( const SkRect bounds)

Definition at line 536 of file layer_state_stack.cc.

536 {
537 layer_state_stack_->save_layer(bounds);
538}

◆ transform() [1/2]

void flutter::MutatorContext::transform ( const SkM44 m44)

Definition at line 587 of file layer_state_stack.cc.

587 {
589 transform(m44.asM33());
590 } else {
591 layer_state_stack_->maybe_save_layer_for_transform(save_needed_);
592 save_needed_ = false;
593 layer_state_stack_->push_transform(m44);
594 }
595}
SkMatrix asM33() const
Definition SkM44.h:409

◆ transform() [2/2]

void flutter::MutatorContext::transform ( const SkMatrix matrix)

Definition at line 577 of file layer_state_stack.cc.

577 {
578 if (matrix.isTranslate()) {
579 translate(matrix.getTranslateX(), matrix.getTranslateY());
580 } else if (!matrix.isIdentity()) {
581 layer_state_stack_->maybe_save_layer_for_transform(save_needed_);
582 save_needed_ = false;
583 layer_state_stack_->push_transform(matrix);
584 }
585}
void translate(SkScalar tx, SkScalar ty)
unsigned useCenter Optional< SkMatrix > matrix
Definition SkRecords.h:258

◆ translate() [1/2]

void flutter::LayerStateStack::MutatorContext::translate ( SkPoint  tp)
inline

Definition at line 210 of file layer_state_stack.h.

210{ translate(tp.fX, tp.fY); }
float fX
x-axis value
float fY
y-axis value

◆ translate() [2/2]

void flutter::MutatorContext::translate ( SkScalar  tx,
SkScalar  ty 
)

Definition at line 569 of file layer_state_stack.cc.

569 {
570 if (!(tx == 0 && ty == 0)) {
571 layer_state_stack_->maybe_save_layer_for_transform(save_needed_);
572 save_needed_ = false;
573 layer_state_stack_->push_translate(tx, ty);
574 }
575}

Friends And Related Symbol Documentation

◆ LayerStateStack

friend class LayerStateStack
friend

Definition at line 223 of file layer_state_stack.h.


The documentation for this class was generated from the following files: