mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 18:22:45 +00:00 
			
		
		
		
	 02b73cb93d
			
		
	
	
		02b73cb93d
		
	
	
	
	
		
			
			This fixes a bug that was reported on this discord server by @ElectrodeYT - due to the confusion of passing arguments in different orders, we messed up and triggered a page fault due to faulty sizes.
		
			
				
	
	
		
			31 lines
		
	
	
	
		
			794 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
	
		
			794 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <AK/String.h>
 | |
| #include <AK/Types.h>
 | |
| #include <Kernel/Graphics/FramebufferDevice.h>
 | |
| #include <Kernel/Graphics/GraphicsDevice.h>
 | |
| #include <Kernel/PhysicalAddress.h>
 | |
| 
 | |
| namespace Kernel {
 | |
| 
 | |
| class RawFramebufferDevice : public FramebufferDevice {
 | |
|     AK_MAKE_ETERNAL
 | |
|     friend class GraphicsDevice;
 | |
| 
 | |
| public:
 | |
|     static NonnullRefPtr<RawFramebufferDevice> create(const GraphicsDevice&, PhysicalAddress, size_t width, size_t height, size_t pitch);
 | |
| 
 | |
|     virtual ~RawFramebufferDevice() {};
 | |
| 
 | |
| private:
 | |
|     RawFramebufferDevice(PhysicalAddress, size_t width, size_t height, size_t pitch);
 | |
|     virtual const char* class_name() const override { return "RawFramebuffer"; }
 | |
| };
 | |
| 
 | |
| }
 |