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

Side by Side Diff: ui/gl/gl_surface_stub.h

Issue 2702403009: Make surface GetFormat pure virtual, add missing overrides. (Closed)
Patch Set: Fix class name for Windows Created 3 years, 10 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
« no previous file with comments | « ui/gl/gl_surface_glx.cc ('k') | ui/gl/gl_surface_stub.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_GL_GL_SURFACE_STUB_H_ 5 #ifndef UI_GL_GL_SURFACE_STUB_H_
6 #define UI_GL_GL_SURFACE_STUB_H_ 6 #define UI_GL_GL_SURFACE_STUB_H_
7 7
8 #include "ui/gl/gl_export.h" 8 #include "ui/gl/gl_export.h"
9 #include "ui/gl/gl_surface.h" 9 #include "ui/gl/gl_surface.h"
10 10
11 namespace gl { 11 namespace gl {
12 12
13 // A GLSurface that does nothing for unit tests. 13 // A GLSurface that does nothing for unit tests.
14 class GL_EXPORT GLSurfaceStub : public GLSurface { 14 class GL_EXPORT GLSurfaceStub : public GLSurface {
15 public: 15 public:
16 void SetSize(const gfx::Size& size) { size_ = size; } 16 void SetSize(const gfx::Size& size) { size_ = size; }
17 void set_buffers_flipped(bool flipped) { buffers_flipped_ = flipped; } 17 void set_buffers_flipped(bool flipped) { buffers_flipped_ = flipped; }
18 18
19 // Implement GLSurface. 19 // Implement GLSurface.
20 void Destroy() override; 20 void Destroy() override;
21 bool Resize(const gfx::Size& size, 21 bool Resize(const gfx::Size& size,
22 float scale_factor, 22 float scale_factor,
23 bool has_alpha) override; 23 bool has_alpha) override;
24 bool IsOffscreen() override; 24 bool IsOffscreen() override;
25 gfx::SwapResult SwapBuffers() override; 25 gfx::SwapResult SwapBuffers() override;
26 gfx::Size GetSize() override; 26 gfx::Size GetSize() override;
27 void* GetHandle() override; 27 void* GetHandle() override;
28 bool BuffersFlipped() const override; 28 bool BuffersFlipped() const override;
29 GLSurfaceFormat GetFormat() override;
29 30
30 protected: 31 protected:
31 ~GLSurfaceStub() override; 32 ~GLSurfaceStub() override;
32 33
33 private: 34 private:
34 gfx::Size size_; 35 gfx::Size size_;
35 bool buffers_flipped_ = false; 36 bool buffers_flipped_ = false;
36 }; 37 };
37 38
38 } // namespace gl 39 } // namespace gl
39 40
40 #endif // UI_GL_GL_SURFACE_STUB_H_ 41 #endif // UI_GL_GL_SURFACE_STUB_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_glx.cc ('k') | ui/gl/gl_surface_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698