Example #1
0
void
Bitmap::Reset()
{
  if (id.IsDefined() || !pathName.empty()) {
    RemoveSurfaceListener(*this);
    id = ResourceId::Null();
    pathName.clear();
  }

  delete texture;
  texture = nullptr;
}
Example #2
0
void
Bitmap::Reset()
{
  if (id != 0 || !pathName.empty()) {
    RemoveSurfaceListener(*this);
    id = 0;
    pathName.clear();
  }

  delete texture;
  texture = NULL;
}
Example #3
0
void
Bitmap::reset()
{
  if (id == 0) {
    assert(texture == NULL);
    return;
  }

  RemoveSurfaceListener(*this);
  id = 0;

  delete texture;
  texture = NULL;
}
Example #4
0
void
BufferCanvas::Destroy()
{
  assert(!active);

  if (IsDefined()) {
    RemoveSurfaceListener(*this);

    delete stencil_buffer;
    stencil_buffer = nullptr;

    delete frame_buffer;
    frame_buffer = nullptr;

    delete texture;
    texture = nullptr;
  }
}
Example #5
0
RawBitmap::~RawBitmap()
{
  RemoveSurfaceListener(*this);

  delete texture;
}