示例#1
0
 protected void EnsureDevice()
 {
     if (this.Device == null)
     {
         this.Device = CompositionHelper.CreateDevice(this.DxgiContainer.DxgiDevice, this.DeviceVariant);
     }
 }
示例#2
0
        private void CreateSurface()
        {
            var size = this.Options.Size;

            this.Surface = CompositionHelper.CreateSurface(this.Device, this.DeviceVariant, size.Width, size.Height,
                                                           this.Options.PixelFormat, this.Options.AlphaMode);
            this.SetContent(this.Surface);
        }
示例#3
0
 protected CompositorCore(int variant)
 {
     if (variant == -1)
     {
         variant = CompositionHelper.GetVariantForPlatform();
     }
     this.DeviceVariant             = variant;
     this.m_onDxgiDestroyedAction   = () => this.DestroyInternal(true);
     this.m_onDxgiInitializedAction = () => this.InitializeInternal(true);
 }
示例#4
0
 public void Commit()
 {
     CompositionHelper.Commit(this.Device, this.DeviceVariant);
 }