Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(400)

Side by Side Diff: ui/ozone/platform/dri/dri_surface.h

Issue 402773002: [Ozone-DRI] Removing MockDriSurface implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_OZONE_PLATFORM_DRI_DRI_SURFACE_H_ 5 #ifndef UI_OZONE_PLATFORM_DRI_DRI_SURFACE_H_
6 #define UI_OZONE_PLATFORM_DRI_DRI_SURFACE_H_ 6 #define UI_OZONE_PLATFORM_DRI_DRI_SURFACE_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/gfx/geometry/size.h" 10 #include "ui/gfx/geometry/size.h"
(...skipping 22 matching lines...) Expand all
33 virtual uint32_t GetFramebufferId() const OVERRIDE; 33 virtual uint32_t GetFramebufferId() const OVERRIDE;
34 virtual uint32_t GetHandle() const OVERRIDE; 34 virtual uint32_t GetHandle() const OVERRIDE;
35 virtual void PreSwapBuffers() OVERRIDE; 35 virtual void PreSwapBuffers() OVERRIDE;
36 virtual void SwapBuffers() OVERRIDE; 36 virtual void SwapBuffers() OVERRIDE;
37 virtual gfx::Size Size() const OVERRIDE; 37 virtual gfx::Size Size() const OVERRIDE;
38 38
39 private: 39 private:
40 DriBuffer* frontbuffer() const { return bitmaps_[front_buffer_].get(); } 40 DriBuffer* frontbuffer() const { return bitmaps_[front_buffer_].get(); }
41 DriBuffer* backbuffer() const { return bitmaps_[front_buffer_ ^ 1].get(); } 41 DriBuffer* backbuffer() const { return bitmaps_[front_buffer_ ^ 1].get(); }
42 42
43 // Used to create the backing buffers.
44 virtual DriBuffer* CreateBuffer();
45
46 // Stores the connection to the graphics card. Pointer not owned by this 43 // Stores the connection to the graphics card. Pointer not owned by this
47 // class. 44 // class.
48 DriWrapper* dri_; 45 DriWrapper* dri_;
49 46
50 // The actual buffers used for painting. 47 // The actual buffers used for painting.
51 scoped_ptr<DriBuffer> bitmaps_[2]; 48 scoped_ptr<DriBuffer> bitmaps_[2];
52 49
53 // Keeps track of which bitmap is |buffers_| is the frontbuffer. 50 // Keeps track of which bitmap is |buffers_| is the frontbuffer.
54 int front_buffer_; 51 int front_buffer_;
55 52
56 // Surface size. 53 // Surface size.
57 gfx::Size size_; 54 gfx::Size size_;
58 55
59 DISALLOW_COPY_AND_ASSIGN(DriSurface); 56 DISALLOW_COPY_AND_ASSIGN(DriSurface);
60 }; 57 };
61 58
62 } // namespace ui 59 } // namespace ui
63 60
64 #endif // UI_OZONE_PLATFORM_DRI_DRI_SURFACE_H_ 61 #endif // UI_OZONE_PLATFORM_DRI_DRI_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698