OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/test/test_web_graphics_context_3d.h" | 5 #include "cc/test/test_web_graphics_context_3d.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 } | 96 } |
97 | 97 |
98 int TestWebGraphicsContext3D::width() { | 98 int TestWebGraphicsContext3D::width() { |
99 return width_; | 99 return width_; |
100 } | 100 } |
101 | 101 |
102 int TestWebGraphicsContext3D::height() { | 102 int TestWebGraphicsContext3D::height() { |
103 return height_; | 103 return height_; |
104 } | 104 } |
105 | 105 |
106 void TestWebGraphicsContext3D::reshape(int width, int height) { | 106 void TestWebGraphicsContext3D::reshapeWithScaleFactor( |
| 107 int width, int height, float scale_factor) { |
107 width_ = width; | 108 width_ = width; |
108 height_ = height; | 109 height_ = height; |
109 } | 110 } |
110 | 111 |
111 bool TestWebGraphicsContext3D::isContextLost() { | 112 bool TestWebGraphicsContext3D::isContextLost() { |
112 return context_lost_; | 113 return context_lost_; |
113 } | 114 } |
114 | 115 |
115 WGC3Denum TestWebGraphicsContext3D::getGraphicsResetStatusARB() { | 116 WGC3Denum TestWebGraphicsContext3D::getGraphicsResetStatusARB() { |
116 return context_lost_ ? GL_UNKNOWN_CONTEXT_RESET_ARB : GL_NO_ERROR; | 117 return context_lost_ ? GL_UNKNOWN_CONTEXT_RESET_ARB : GL_NO_ERROR; |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 DCHECK(buffer_id < (1 << 17)); | 454 DCHECK(buffer_id < (1 << 17)); |
454 buffer_id |= context_id_ << 17; | 455 buffer_id |= context_id_ << 17; |
455 return buffer_id; | 456 return buffer_id; |
456 } | 457 } |
457 | 458 |
458 TestWebGraphicsContext3D::Buffer::Buffer() : target(0) {} | 459 TestWebGraphicsContext3D::Buffer::Buffer() : target(0) {} |
459 | 460 |
460 TestWebGraphicsContext3D::Buffer::~Buffer() {} | 461 TestWebGraphicsContext3D::Buffer::~Buffer() {} |
461 | 462 |
462 } // namespace cc | 463 } // namespace cc |
OLD | NEW |