void ElementScrollListVertical::update_screen_size(int size_x, int size_y){
    screen_size_x = size_x;
    screen_size_y = size_y;
    //update_my_elements_pos_px();
    //update_my_elements_size_px();
    qDebug("scaling ElementScrollListVertical...");

    resize_elements(size_x, size_y);
}
Exemplo n.º 2
0
void ElementGroup::update_screen_size(int size_x, int size_y){
    screen_size_x = size_x;
    screen_size_y = size_y;
    //update_my_elements_pos_px();
    //update_my_elements_size_px();
    qDebug("scaling scrolllisthorizontal...");

    resize_elements(size_x, size_y);
}
Exemplo n.º 3
0
void addPrediction(uint32_t address, bool pred, bool real)
{
    /*
     * Check if we have already seen this branch and if
     * so update the prediction and real bitvector.
     */
    for (size_t i = 0; i < e.pos; i++) {
        if (e.data[i].address == address) {
            data *d = &(e.data[i]);
            
            if (d->size <= d->pos) {
                resize_data(d);
            }
            d->pred[d->pos] = pred ? 1 : 0;
            d->real[d->pos] = real ? 1 : 0;
            d->pos++;
            return;
        }
    }

    /*
     * We have not seen this branch before. See if there is room in the array
     * And add the first entry in the branch.
     */
    if (e.size <= e.pos) {
        resize_elements(&e);
    }

    data *d = &(e.data[e.pos]);

    d->address = address;
    d->pred[d->pos] = pred ? 1 : 0;
    d->real[d->pos] = real ? 1 : 0;
    d->pos++;
    e.pos++;

}