A basic graphics package for the LPC4088 Display Module.
Dependents: lpc4088_displaymodule_demo_sphere sampleGUI sampleEmptyGUI lpc4088_displaymodule_fs_aid ... more
Fork of DMBasicGUI by
Diff: SlideShow/Renderer.cpp
- Revision:
- 13:bff2288c2c61
- Parent:
- 5:f4de114c31c3
- Child:
- 15:a68bb30ab95e
--- a/SlideShow/Renderer.cpp Thu Feb 19 14:37:29 2015 +0100 +++ b/SlideShow/Renderer.cpp Mon Mar 09 10:40:55 2015 +0100 @@ -1,12 +1,36 @@ +/* + * Copyright 2014 Embedded Artists AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "mbed.h" #include "Renderer.h" #include "DMBoard.h" +/****************************************************************************** + * Defines and typedefs + *****************************************************************************/ + #if !defined(MIN) #define MIN(__a, __b) (((__a)<(__b))?(__a):(__b)) #endif -Renderer::Renderer(/*LcdController::Config* screen, EaLcdBoard* lcdBoard*/) +/****************************************************************************** + * Public functions + *****************************************************************************/ + +Renderer::Renderer() { memset(layers, 0, sizeof(layerinfo_t)*MaxNumLayers); for (int i = 0; i < MaxNumLayers; i++) { @@ -26,8 +50,8 @@ // Assume screen->bpp == Bpp_16 this->screenBytes = display->bytesPerPixel() * this->screenPixels; - ImageBackBuffer[0] = (image_t)display->allocateFramebuffer();//malloc(this->screenBytes); - ImageBackBuffer[1] = (image_t)display->allocateFramebuffer();//malloc(this->screenBytes); + ImageBackBuffer[0] = (image_t)display->allocateFramebuffer(); + ImageBackBuffer[1] = (image_t)display->allocateFramebuffer(); if ((ImageBackBuffer[0] == NULL) || (ImageBackBuffer[1] == NULL)) { printf("Failed to allocate buffer(s) for Renderer. Halting...\n"); while(1) {