OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "cc/debug/fake_web_graphics_context_3d.h" | 5 #include "cc/debug/fake_web_graphics_context_3d.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "third_party/khronos/GLES2/gl2.h" | 8 #include "third_party/khronos/GLES2/gl2.h" |
9 | 9 |
10 using WebKit::WGC3Dboolean; | 10 using WebKit::WGC3Dboolean; |
11 using WebKit::WGC3Denum; | 11 using WebKit::WGC3Denum; |
12 using WebKit::WebGLId; | 12 using WebKit::WebGLId; |
13 using WebKit::WebGraphicsContext3D; | 13 using WebKit::WebGraphicsContext3D; |
14 | 14 |
15 namespace cc { | 15 namespace cc { |
16 | 16 |
17 FakeWebGraphicsContext3D::FakeWebGraphicsContext3D() | 17 FakeWebGraphicsContext3D::FakeWebGraphicsContext3D() |
18 : WebKit::WebGraphicsContext3D() { | 18 : WebKit::WebGraphicsContext3D() { |
19 } | 19 } |
20 | 20 |
21 FakeWebGraphicsContext3D::~FakeWebGraphicsContext3D() { | 21 FakeWebGraphicsContext3D::~FakeWebGraphicsContext3D() { |
22 } | 22 } |
23 | 23 |
24 bool FakeWebGraphicsContext3D::makeContextCurrent() { | 24 bool FakeWebGraphicsContext3D::makeContextCurrent() { |
25 return true; | 25 return true; |
26 } | 26 } |
27 | 27 |
28 int FakeWebGraphicsContext3D::width() { | |
29 return 1; | |
30 } | |
31 | |
32 int FakeWebGraphicsContext3D::height() { | |
33 return 1; | |
34 } | |
35 | |
36 void FakeWebGraphicsContext3D::reshape(int width, int height) { | |
37 } | |
38 | |
39 bool FakeWebGraphicsContext3D::isGLES2Compliant() { | 28 bool FakeWebGraphicsContext3D::isGLES2Compliant() { |
40 return false; | 29 return false; |
41 } | 30 } |
42 | 31 |
43 WebGLId FakeWebGraphicsContext3D::getPlatformTextureId() { | 32 WebGLId FakeWebGraphicsContext3D::getPlatformTextureId() { |
44 return 0; | 33 return 0; |
45 } | 34 } |
46 | 35 |
47 bool FakeWebGraphicsContext3D::isContextLost() { | 36 bool FakeWebGraphicsContext3D::isContextLost() { |
48 return false; | 37 return false; |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 WebKit::WGC3Denum internalformat) { | 327 WebKit::WGC3Denum internalformat) { |
339 return 0; | 328 return 0; |
340 } | 329 } |
341 | 330 |
342 void* FakeWebGraphicsContext3D::mapImageCHROMIUM(WebKit::WGC3Duint image_id, | 331 void* FakeWebGraphicsContext3D::mapImageCHROMIUM(WebKit::WGC3Duint image_id, |
343 WebKit::WGC3Denum access) { | 332 WebKit::WGC3Denum access) { |
344 return 0; | 333 return 0; |
345 } | 334 } |
346 | 335 |
347 } // namespace cc | 336 } // namespace cc |
OLD | NEW |