widget/gonk/Framebuffer.h

Wed, 31 Dec 2014 07:22:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:22:50 +0100
branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
permissions
-rw-r--r--

Correct previous dual key logic pending first delivery installment.

     1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* vim: set sw=2 ts=8 et ft=cpp : */
     3 /* Copyright 2012 Mozilla Foundation and Mozilla contributors
     4  *
     5  * Licensed under the Apache License, Version 2.0 (the "License");
     6  * you may not use this file except in compliance with the License.
     7  * You may obtain a copy of the License at
     8  *
     9  *     http://www.apache.org/licenses/LICENSE-2.0
    10  *
    11  * Unless required by applicable law or agreed to in writing, software
    12  * distributed under the License is distributed on an "AS IS" BASIS,
    13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14  * See the License for the specific language governing permissions and
    15  * limitations under the License.
    16  */
    18 class gfxASurface;
    19 class nsIntRegion;
    20 class nsIntSize;
    22 namespace mozilla {
    24 namespace Framebuffer {
    26 //
    27 // The general usage of Framebuffer is
    28 //
    29 // -- in initialization code --
    30 //  Open();
    31 //
    32 // -- ready to paint next frame --
    33 //  nsRefPtr<gfxASurface> backBuffer = BackBuffer();
    34 //  // ...
    35 //  Paint(backBuffer);
    36 //  // ...
    37 //  Present();
    38 //
    40 // Return true if the fbdev was successfully opened.  If this fails, 
    41 // the result of all further calls is undefined.  Open() is idempotent.
    42 bool Open();
    44 // After Close(), the result of all further calls is undefined.
    45 // Close() is idempotent, and Open() can be called again after
    46 // Close().
    47 void Close();
    49 // Return true if the fbdev was successfully opened or the size was
    50 // already cached.
    51 bool GetSize(nsIntSize *aScreenSize);
    53 // Return the buffer to be drawn into, that will be the next frame.
    54 gfxASurface* BackBuffer();
    56 // Swap the front buffer for the back buffer.  |aUpdated| is the
    57 // region of the back buffer that was repainted.
    58 void Present(const nsIntRegion& aUpdated);
    60 } // namespace Framebuffer
    62 } // namespace mozilla

mercurial