Skip to content

Commit

Permalink
Fix exports on DeepImageChannel and FlatImageChannel.
Browse files Browse the repository at this point in the history
If the whole class isn't exported, the typeinfo doesn't get exported,
and so dynamic casting into those classes will not work.

Note that this is a manual port of bb3bb3f from the RB-3.1 branch.
I was unable to do a cherry-pick due to conflicts from minor text
formatting differences between branches.
  • Loading branch information
rvinluan-sidefx committed Nov 28, 2023
1 parent 737b270 commit 147a458
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
16 changes: 8 additions & 8 deletions src/lib/OpenEXRUtil/ImfDeepImageChannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class SampleCountChannel;
// of the level.
//

class IMFUTIL_EXPORT_TYPE DeepImageChannel : public ImageChannel
class IMFUTIL_EXPORT DeepImageChannel : public ImageChannel
{
public:
//
Expand All @@ -56,21 +56,21 @@ class IMFUTIL_EXPORT_TYPE DeepImageChannel : public ImageChannel
// Access to the image level to which this channel belongs.
//

IMFUTIL_EXPORT DeepImageLevel& deepLevel ();
IMFUTIL_EXPORT const DeepImageLevel& deepLevel () const;
DeepImageLevel& deepLevel ();
const DeepImageLevel& deepLevel () const;

//
// Access to the sample count channel for this deep channel.
//

IMFUTIL_EXPORT SampleCountChannel& sampleCounts ();
IMFUTIL_EXPORT const SampleCountChannel& sampleCounts () const;
SampleCountChannel& sampleCounts ();
const SampleCountChannel& sampleCounts () const;

protected:
friend class DeepImageLevel;

IMFUTIL_EXPORT DeepImageChannel (DeepImageLevel& level, bool pLinear);
IMFUTIL_EXPORT virtual ~DeepImageChannel ();
DeepImageChannel (DeepImageLevel& level, bool pLinear);
virtual ~DeepImageChannel ();

DeepImageChannel (const DeepImageChannel& other) = delete;
DeepImageChannel& operator= (const DeepImageChannel& other) = delete;
Expand All @@ -93,7 +93,7 @@ class IMFUTIL_EXPORT_TYPE DeepImageChannel : public ImageChannel

virtual void initializeSampleLists () = 0;

IMFUTIL_EXPORT virtual void resize ();
virtual void resize ();

virtual void resetBasePointer () = 0;
};
Expand Down
10 changes: 4 additions & 6 deletions src/lib/OpenEXRUtil/ImfFlatImageChannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class FlatImageLevel;
// only for pixels within the data window of the level.
//

class IMFUTIL_EXPORT_TYPE FlatImageChannel : public ImageChannel
class IMFUTIL_EXPORT FlatImageChannel : public ImageChannel
{
public:
//
Expand All @@ -53,24 +53,22 @@ class IMFUTIL_EXPORT_TYPE FlatImageChannel : public ImageChannel
// Access to the flat image level to which this channel belongs.
//

IMFUTIL_EXPORT FlatImageLevel& flatLevel ();
IMFUTIL_EXPORT const FlatImageLevel& flatLevel () const;
FlatImageLevel& flatLevel ();
const FlatImageLevel& flatLevel () const;

protected:
friend class FlatImageLevel;

IMFUTIL_EXPORT
FlatImageChannel (
FlatImageLevel& level, int xSampling, int ySampling, bool pLinear);

IMFUTIL_EXPORT virtual ~FlatImageChannel ();
virtual ~FlatImageChannel ();

FlatImageChannel (const FlatImageChannel& other) = delete;
FlatImageChannel& operator= (const FlatImageChannel& other) = delete;
FlatImageChannel (FlatImageChannel&& other) = delete;
FlatImageChannel& operator= (FlatImageChannel&& other) = delete;

IMFUTIL_EXPORT
virtual void resize ();

virtual void resetBasePointer () = 0;
Expand Down

0 comments on commit 147a458

Please sign in to comment.