Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #include "components/html_viewer/blink_platform_impl.h" | 5 #include "components/html_viewer/blink_platform_impl.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 165 const unsigned char* BlinkPlatformImpl::getTraceCategoryEnabledFlag( | 165 const unsigned char* BlinkPlatformImpl::getTraceCategoryEnabledFlag( |
| 166 const char* category_name) { | 166 const char* category_name) { |
| 167 static const unsigned char buf[] = "*"; | 167 static const unsigned char buf[] = "*"; |
| 168 return buf; | 168 return buf; |
| 169 } | 169 } |
| 170 | 170 |
| 171 blink::WebGraphicsContext3D* | 171 blink::WebGraphicsContext3D* |
| 172 BlinkPlatformImpl::createOffscreenGraphicsContext3D( | 172 BlinkPlatformImpl::createOffscreenGraphicsContext3D( |
| 173 const blink::WebGraphicsContext3D::Attributes& attributes, | 173 const blink::WebGraphicsContext3D::Attributes& attributes, |
| 174 blink::WebGraphicsContext3D* share_context) { | 174 blink::WebGraphicsContext3D* share_context) { |
| 175 return createOffscreenGraphicsContext3D(attributes, share_context, nullptr); | 175 blink::WebGraphicsContext3D::WebGraphicsInfo glInfo; |
|
sky
2015/10/16 20:28:50
gl_info here and 193.
sivag
2015/10/19 16:19:23
Done.
| |
| 176 return createOffscreenGraphicsContext3D(attributes, share_context, glInfo); | |
| 176 } | 177 } |
| 177 | 178 |
| 178 blink::WebGraphicsContext3D* | 179 blink::WebGraphicsContext3D* |
| 179 BlinkPlatformImpl::createOffscreenGraphicsContext3D( | 180 BlinkPlatformImpl::createOffscreenGraphicsContext3D( |
| 180 const blink::WebGraphicsContext3D::Attributes& attributes, | 181 const blink::WebGraphicsContext3D::Attributes& attributes, |
| 181 blink::WebGraphicsContext3D* share_context, | 182 blink::WebGraphicsContext3D* share_context, |
| 182 blink::WebGLInfo* gl_info) { | 183 blink::WebGraphicsContext3D::WebGraphicsInfo& gl_info) { |
| 183 // TODO(penghuang): Use the app from the right HTMLDocument. | 184 // TODO(penghuang): Use the app from the right HTMLDocument. |
| 184 return WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( | 185 return WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( |
| 185 global_state_, app_, GURL(attributes.topDocumentURL), attributes, | 186 global_state_, app_, GURL(attributes.topDocumentURL), attributes, |
| 186 share_context, gl_info); | 187 share_context, gl_info); |
| 187 } | 188 } |
| 188 | 189 |
| 189 blink::WebGraphicsContext3D* | 190 blink::WebGraphicsContext3D* |
| 190 BlinkPlatformImpl::createOffscreenGraphicsContext3D( | 191 BlinkPlatformImpl::createOffscreenGraphicsContext3D( |
| 191 const blink::WebGraphicsContext3D::Attributes& attributes) { | 192 const blink::WebGraphicsContext3D::Attributes& attributes) { |
| 192 return createOffscreenGraphicsContext3D(attributes, nullptr, nullptr); | 193 blink::WebGraphicsContext3D::WebGraphicsInfo glInfo; |
| 194 return createOffscreenGraphicsContext3D(attributes, nullptr, glInfo); | |
| 193 } | 195 } |
| 194 | 196 |
| 195 blink::WebGraphicsContext3DProvider* | 197 blink::WebGraphicsContext3DProvider* |
| 196 BlinkPlatformImpl::createSharedOffscreenGraphicsContext3DProvider() { | 198 BlinkPlatformImpl::createSharedOffscreenGraphicsContext3DProvider() { |
| 197 return nullptr; | 199 return nullptr; |
| 198 } | 200 } |
| 199 | 201 |
| 200 blink::WebData BlinkPlatformImpl::loadResource(const char* resource) { | 202 blink::WebData BlinkPlatformImpl::loadResource(const char* resource) { |
| 201 for (size_t i = 0; i < arraysize(kDataResources); ++i) { | 203 for (size_t i = 0; i < arraysize(kDataResources); ++i) { |
| 202 if (!strcmp(resource, kDataResources[i].name)) { | 204 if (!strcmp(resource, kDataResources[i].name)) { |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 315 BlinkPlatformImpl::notificationManager() { | 317 BlinkPlatformImpl::notificationManager() { |
| 316 return &web_notification_manager_; | 318 return &web_notification_manager_; |
| 317 } | 319 } |
| 318 | 320 |
| 319 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread) { | 321 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread) { |
| 320 DCHECK(!current_thread_slot_.Get()); | 322 DCHECK(!current_thread_slot_.Get()); |
| 321 current_thread_slot_.Set(thread); | 323 current_thread_slot_.Set(thread); |
| 322 } | 324 } |
| 323 | 325 |
| 324 } // namespace html_viewer | 326 } // namespace html_viewer |
| OLD | NEW |