mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 12:57:57 -05:00
renderer_base: Make Rasterizer() return the rasterizer by reference
All calling code assumes that the rasterizer will be in a valid state, which is a totally fine assumption. The only way the rasterizer wouldn't be is if initialization is done incorrectly or fails, which is checked against in System::Init().
This commit is contained in:
@ -46,8 +46,12 @@ public:
|
||||
return m_current_frame;
|
||||
}
|
||||
|
||||
RasterizerInterface* Rasterizer() const {
|
||||
return rasterizer.get();
|
||||
RasterizerInterface& Rasterizer() {
|
||||
return *rasterizer;
|
||||
}
|
||||
|
||||
const RasterizerInterface& Rasterizer() const {
|
||||
return *rasterizer;
|
||||
}
|
||||
|
||||
void RefreshRasterizerSetting();
|
||||
|
@ -160,8 +160,8 @@ void RendererOpenGL::LoadFBToScreenInfo(const Tegra::FramebufferConfig& framebuf
|
||||
// only allows rows to have a memory alignement of 4.
|
||||
ASSERT(framebuffer.stride % 4 == 0);
|
||||
|
||||
if (!Rasterizer()->AccelerateDisplay(framebuffer, framebuffer_addr, framebuffer.stride,
|
||||
screen_info)) {
|
||||
if (!rasterizer->AccelerateDisplay(framebuffer, framebuffer_addr, framebuffer.stride,
|
||||
screen_info)) {
|
||||
// Reset the screen info's display texture to its own permanent texture
|
||||
screen_info.display_texture = screen_info.texture.resource.handle;
|
||||
|
||||
|
Reference in New Issue
Block a user