OLD | NEW |
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 #include "base/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/i18n/icu_util.h" | 8 #include "base/i18n/icu_util.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 context_->bindTexture(GL_TEXTURE_2D, texture_id()); | 137 context_->bindTexture(GL_TEXTURE_2D, texture_id()); |
138 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); | 138 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); |
139 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); | 139 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); |
140 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); | 140 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); |
141 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); | 141 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); |
142 context_->texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, | 142 context_->texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, |
143 size.width(), size.height(), 0, | 143 size.width(), size.height(), 0, |
144 GL_RGBA, GL_UNSIGNED_BYTE, NULL); | 144 GL_RGBA, GL_UNSIGNED_BYTE, NULL); |
145 } | 145 } |
146 | 146 |
| 147 virtual WebGraphicsContext3D* hostContext3D() OVERRIDE { |
| 148 return context_; |
| 149 } |
| 150 |
147 private: | 151 private: |
148 virtual ~WebGLTexture() { | 152 virtual ~WebGLTexture() { |
149 context_->deleteTexture(texture_id()); | 153 context_->deleteTexture(texture_id()); |
150 } | 154 } |
151 | 155 |
152 WebGraphicsContext3D* context_; | 156 WebGraphicsContext3D* context_; |
153 | 157 |
154 DISALLOW_COPY_AND_ASSIGN(WebGLTexture); | 158 DISALLOW_COPY_AND_ASSIGN(WebGLTexture); |
155 }; | 159 }; |
156 | 160 |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 #endif | 335 #endif |
332 | 336 |
333 root_window->ShowRootWindow(); | 337 root_window->ShowRootWindow(); |
334 MessageLoopForUI::current()->Run(); | 338 MessageLoopForUI::current()->Run(); |
335 root_window.reset(); | 339 root_window.reset(); |
336 | 340 |
337 ui::CompositorTestSupport::Terminate(); | 341 ui::CompositorTestSupport::Terminate(); |
338 | 342 |
339 return 0; | 343 return 0; |
340 } | 344 } |
OLD | NEW |