зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1331515 - Rename WRState into WrState. r=gfx?
This commit is contained in:
Родитель
bf5fc449f0
Коммит
3dbccd2998
|
@ -169,7 +169,7 @@ WebRenderAPI::SetRootDisplayList(gfx::Color aBgColor,
|
|||
LayerSize aViewportSize,
|
||||
DisplayListBuilder& aBuilder)
|
||||
{
|
||||
wr_api_set_root_display_list(mWRApi, aBuilder.mWRState,
|
||||
wr_api_set_root_display_list(mWRApi, aBuilder.mWrState,
|
||||
aEpoch.mHandle,
|
||||
aViewportSize.width, aViewportSize.height);
|
||||
}
|
||||
|
@ -262,27 +262,27 @@ WebRenderAPI::SetProfilerEnabled(bool aEnabled)
|
|||
DisplayListBuilder::DisplayListBuilder(const LayerIntSize& aSize, PipelineId aId)
|
||||
{
|
||||
MOZ_COUNT_CTOR(DisplayListBuilder);
|
||||
mWRState = wr_state_new(aSize.width, aSize.height, aId.mHandle);
|
||||
mWrState = wr_state_new(aSize.width, aSize.height, aId.mHandle);
|
||||
}
|
||||
|
||||
DisplayListBuilder::~DisplayListBuilder()
|
||||
{
|
||||
MOZ_COUNT_DTOR(DisplayListBuilder);
|
||||
#ifdef MOZ_ENABLE_WEBRENDER
|
||||
wr_state_delete(mWRState);
|
||||
wr_state_delete(mWrState);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
DisplayListBuilder::Begin(const LayerIntSize& aSize)
|
||||
{
|
||||
wr_dp_begin(mWRState, aSize.width, aSize.height);
|
||||
wr_dp_begin(mWrState, aSize.width, aSize.height);
|
||||
}
|
||||
|
||||
void
|
||||
DisplayListBuilder::End(WebRenderAPI& aApi, Epoch aEpoch)
|
||||
{
|
||||
wr_dp_end(mWRState, aApi.mWRApi, aEpoch.mHandle);
|
||||
wr_dp_end(mWrState, aApi.mWRApi, aEpoch.mHandle);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -291,14 +291,14 @@ DisplayListBuilder::PushStackingContext(const WrRect& aBounds,
|
|||
const WRImageMask* aMask,
|
||||
const gfx::Matrix4x4& aTransform)
|
||||
{
|
||||
wr_dp_push_stacking_context(mWRState, aBounds, aOverflow, aMask,
|
||||
wr_dp_push_stacking_context(mWrState, aBounds, aOverflow, aMask,
|
||||
&aTransform.components[0]);
|
||||
}
|
||||
|
||||
void
|
||||
DisplayListBuilder::PopStackingContext()
|
||||
{
|
||||
wr_dp_pop_stacking_context(mWRState);
|
||||
wr_dp_pop_stacking_context(mWrState);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -306,7 +306,7 @@ DisplayListBuilder::PushRect(const WrRect& aBounds,
|
|||
const WrRect& aClip,
|
||||
const gfx::Color& aColor)
|
||||
{
|
||||
wr_dp_push_rect(mWRState, aBounds, aClip,
|
||||
wr_dp_push_rect(mWrState, aBounds, aClip,
|
||||
aColor.r, aColor.g, aColor.b, aColor.a);
|
||||
}
|
||||
|
||||
|
@ -317,7 +317,7 @@ DisplayListBuilder::PushImage(const WrRect& aBounds,
|
|||
const WRTextureFilter aFilter,
|
||||
WRImageKey aImage)
|
||||
{
|
||||
wr_dp_push_image(mWRState, aBounds, aClip, aMask, aFilter, aImage);
|
||||
wr_dp_push_image(mWrState, aBounds, aClip, aMask, aFilter, aImage);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -325,7 +325,7 @@ DisplayListBuilder::PushIFrame(const WrRect& aBounds,
|
|||
const WrRect& aClip,
|
||||
PipelineId aPipeline)
|
||||
{
|
||||
wr_dp_push_iframe(mWRState, aBounds, aClip, aPipeline.mHandle);
|
||||
wr_dp_push_iframe(mWrState, aBounds, aClip, aPipeline.mHandle);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -340,7 +340,7 @@ DisplayListBuilder::PushBorder(const WrRect& aBounds,
|
|||
const WrLayoutSize& aBottomLeftRadius,
|
||||
const WrLayoutSize& aBottomRightRadius)
|
||||
{
|
||||
wr_dp_push_border(mWRState, aBounds, aClip,
|
||||
wr_dp_push_border(mWrState, aBounds, aClip,
|
||||
aTop, aRight, aBottom, aLeft,
|
||||
aTopLeftRadius, aTopRightRadius,
|
||||
aBottomLeftRadius, aBottomRightRadius);
|
||||
|
@ -354,7 +354,7 @@ DisplayListBuilder::PushText(const WrRect& aBounds,
|
|||
Range<const WRGlyphInstance> aGlyphBuffer,
|
||||
float aGlyphSize)
|
||||
{
|
||||
wr_dp_push_text(mWRState, aBounds, aClip,
|
||||
wr_dp_push_text(mWrState, aBounds, aClip,
|
||||
ToWRColor(aColor),
|
||||
aFontKey.mHandle,
|
||||
&aGlyphBuffer[0], aGlyphBuffer.length(),
|
||||
|
|
|
@ -84,7 +84,7 @@ protected:
|
|||
friend class DisplayListBuilder;
|
||||
};
|
||||
|
||||
/// This is a simple C++ wrapper around WRState defined in the rust bindings.
|
||||
/// This is a simple C++ wrapper around WrState defined in the rust bindings.
|
||||
/// We may want to turn this into a direct wrapper on top of WebRenderFrameBuilder
|
||||
/// instead, so the interface may change a bit.
|
||||
class DisplayListBuilder {
|
||||
|
@ -138,9 +138,9 @@ public:
|
|||
float aGlyphSize);
|
||||
|
||||
// Try to avoid using this when possible.
|
||||
WRState* Raw() { return mWRState; }
|
||||
WrState* Raw() { return mWrState; }
|
||||
protected:
|
||||
WRState* mWRState;
|
||||
WrState* mWrState;
|
||||
|
||||
friend class WebRenderAPI;
|
||||
};
|
||||
|
|
|
@ -189,7 +189,7 @@ struct wrwindowstate;
|
|||
#endif
|
||||
|
||||
struct WrRenderer;
|
||||
struct WRState;
|
||||
struct WrState;
|
||||
|
||||
WR_INLINE void
|
||||
wr_renderer_update(WrRenderer* renderer) WR_FUNC;
|
||||
|
@ -218,7 +218,7 @@ wr_window_new(WRWindowId window_id,
|
|||
WrRenderer** out_renderer) WR_FUNC;
|
||||
|
||||
WR_INLINE void
|
||||
wr_window_remove_pipeline(wrwindowstate* window, WRState* state) WR_FUNC;
|
||||
wr_window_remove_pipeline(wrwindowstate* window, WrState* state) WR_FUNC;
|
||||
|
||||
WR_INLINE void
|
||||
wr_api_delete(WrAPI* api) WR_FUNC;
|
||||
|
@ -243,7 +243,7 @@ WR_INLINE void
|
|||
wr_api_set_root_pipeline(WrAPI* api, WRPipelineId pipeline_id) WR_FUNC;
|
||||
|
||||
WR_INLINE void
|
||||
wr_api_set_root_display_list(WrAPI* api, WRState* state, uint32_t epoch, float w, float h) WR_FUNC;
|
||||
wr_api_set_root_display_list(WrAPI* api, WrState* state, uint32_t epoch, float w, float h) WR_FUNC;
|
||||
|
||||
WR_INLINE void
|
||||
wr_window_init_pipeline_epoch(wrwindowstate* window, WRPipelineId pipeline, uint32_t width, uint32_t height) WR_FUNC;
|
||||
|
@ -261,14 +261,14 @@ wr_init_window(WRPipelineId root_pipeline_id,
|
|||
WRExternalImageHandler* handler = nullptr)
|
||||
WR_FUNC;
|
||||
|
||||
WR_INLINE WRState*
|
||||
WR_INLINE WrState*
|
||||
wr_state_new(uint32_t width, uint32_t height, WRPipelineId pipeline_id) WR_FUNC;
|
||||
|
||||
WR_INLINE void
|
||||
wr_state_delete(WRState* state) WR_FUNC;
|
||||
wr_state_delete(WrState* state) WR_FUNC;
|
||||
|
||||
WR_INLINE void
|
||||
wr_destroy(wrwindowstate* wrWindow, WRState* WRState)
|
||||
wr_destroy(wrwindowstate* wrWindow, WrState* WrState)
|
||||
WR_FUNC;
|
||||
|
||||
WR_INLINE WRImageKey
|
||||
|
@ -298,42 +298,42 @@ wr_delete_image(wrwindowstate* wrWindow, WRImageKey key)
|
|||
WR_FUNC;
|
||||
|
||||
WR_INLINE void
|
||||
wr_dp_push_stacking_context(WRState *wrState, WrRect bounds,
|
||||
wr_dp_push_stacking_context(WrState *wrState, WrRect bounds,
|
||||
WrRect overflow, const WRImageMask *mask,
|
||||
const float* matrix)
|
||||
WR_FUNC;
|
||||
|
||||
//XXX: matrix should use a proper type
|
||||
WR_INLINE void
|
||||
wr_dp_pop_stacking_context(WRState *wrState)
|
||||
wr_dp_pop_stacking_context(WrState *wrState)
|
||||
WR_FUNC;
|
||||
|
||||
WR_INLINE void
|
||||
wr_dp_begin(WRState* wrState, uint32_t width, uint32_t height)
|
||||
wr_dp_begin(WrState* wrState, uint32_t width, uint32_t height)
|
||||
WR_FUNC;
|
||||
|
||||
WR_INLINE void
|
||||
wr_window_dp_begin(wrwindowstate* wrWindow, WRState* wrState, uint32_t width, uint32_t height)
|
||||
wr_window_dp_begin(wrwindowstate* wrWindow, WrState* wrState, uint32_t width, uint32_t height)
|
||||
WR_FUNC;
|
||||
|
||||
WR_INLINE void
|
||||
wr_window_dp_end(wrwindowstate* wrWindow, WRState* wrState)
|
||||
wr_window_dp_end(wrwindowstate* wrWindow, WrState* wrState)
|
||||
WR_FUNC;
|
||||
|
||||
WR_INLINE void
|
||||
wr_dp_end(WRState* builder, WrAPI* api, uint32_t epoch) WR_FUNC;
|
||||
wr_dp_end(WrState* builder, WrAPI* api, uint32_t epoch) WR_FUNC;
|
||||
|
||||
WR_INLINE void
|
||||
wr_composite_window(wrwindowstate* wrWindow)
|
||||
WR_FUNC;
|
||||
|
||||
WR_INLINE void
|
||||
wr_dp_push_rect(WRState* wrState, WrRect bounds, WrRect clip,
|
||||
wr_dp_push_rect(WrState* wrState, WrRect bounds, WrRect clip,
|
||||
float r, float g, float b, float a)
|
||||
WR_FUNC;
|
||||
|
||||
WR_INLINE void
|
||||
wr_dp_push_text(WRState* wrState,
|
||||
wr_dp_push_text(WrState* wrState,
|
||||
WrRect bounds, WrRect clip,
|
||||
WRColor color,
|
||||
WRFontKey font_Key,
|
||||
|
@ -341,25 +341,25 @@ wr_dp_push_text(WRState* wrState,
|
|||
uint32_t glyph_count, float glyph_size) WR_FUNC;
|
||||
|
||||
WR_INLINE void
|
||||
wr_dp_push_border(WRState* wrState, WrRect bounds, WrRect clip,
|
||||
wr_dp_push_border(WrState* wrState, WrRect bounds, WrRect clip,
|
||||
WRBorderSide top, WRBorderSide right, WRBorderSide bottom, WRBorderSide left,
|
||||
WrLayoutSize top_left_radius, WrLayoutSize top_right_radius,
|
||||
WrLayoutSize bottom_left_radius, WrLayoutSize bottom_right_radius)
|
||||
WR_FUNC;
|
||||
|
||||
WR_INLINE void
|
||||
wr_dp_push_image(WRState* wrState, WrRect bounds, WrRect clip,
|
||||
wr_dp_push_image(WrState* wrState, WrRect bounds, WrRect clip,
|
||||
const WRImageMask* mask, WRTextureFilter filter, WRImageKey key)
|
||||
WR_FUNC;
|
||||
|
||||
// TODO: Remove.
|
||||
WR_INLINE void
|
||||
wr_window_dp_push_iframe(wrwindowstate* wrWindow, WRState* wrState, WrRect bounds, WrRect clip,
|
||||
wr_window_dp_push_iframe(wrwindowstate* wrWindow, WrState* wrState, WrRect bounds, WrRect clip,
|
||||
WRPipelineId layers_id)
|
||||
WR_FUNC;
|
||||
|
||||
WR_INLINE void
|
||||
wr_dp_push_iframe(WRState* wrState, WrRect bounds, WrRect clip, WRPipelineId layers_id) WR_FUNC;
|
||||
wr_dp_push_iframe(WrState* wrState, WrRect bounds, WrRect clip, WRPipelineId layers_id) WR_FUNC;
|
||||
|
||||
// TODO: Remove.
|
||||
// It is the responsibility of the caller to manage the dst_buffer memory
|
||||
|
|
Загрузка…
Ссылка в новой задаче