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

Unified Diff: components/html_viewer/blink_platform_impl.cc

Issue 1338433002: Mandoline: Add WebGL support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix gn check issue Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/html_viewer/blink_platform_impl.h ('k') | components/html_viewer/html_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/html_viewer/blink_platform_impl.cc
diff --git a/components/html_viewer/blink_platform_impl.cc b/components/html_viewer/blink_platform_impl.cc
index fbf40d3ab3ac60db81b7da6b4490111de0f11e08..560a4f51427b4070b6a716a82ad7a832dca11c9e 100644
--- a/components/html_viewer/blink_platform_impl.cc
+++ b/components/html_viewer/blink_platform_impl.cc
@@ -17,6 +17,7 @@
#include "components/html_viewer/blink_resource_constants.h"
#include "components/html_viewer/web_clipboard_impl.h"
#include "components/html_viewer/web_cookie_jar_impl.h"
+#include "components/html_viewer/web_graphics_context_3d_command_buffer_impl.h"
#include "components/html_viewer/web_socket_handle_impl.h"
#include "components/html_viewer/web_url_loader_impl.h"
#include "components/message_port/web_message_port_channel_impl.h"
@@ -34,6 +35,7 @@
#include "third_party/WebKit/public/platform/WebWaitableEvent.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/events/gestures/blink/web_gesture_curve_impl.h"
+#include "url/gurl.h"
namespace html_viewer {
namespace {
@@ -68,7 +70,8 @@ class WebWaitableEventImpl : public blink::WebWaitableEvent {
BlinkPlatformImpl::BlinkPlatformImpl(
mojo::ApplicationImpl* app,
scheduler::RendererScheduler* renderer_scheduler)
- : main_thread_task_runner_(renderer_scheduler->DefaultTaskRunner()),
+ : app_(app),
+ main_thread_task_runner_(renderer_scheduler->DefaultTaskRunner()),
main_thread_(new scheduler::WebThreadImplForRendererScheduler(
renderer_scheduler)) {
if (app) {
@@ -162,6 +165,34 @@ const unsigned char* BlinkPlatformImpl::getTraceCategoryEnabledFlag(
return buf;
}
+blink::WebGraphicsContext3D*
+BlinkPlatformImpl::createOffscreenGraphicsContext3D(
+ const blink::WebGraphicsContext3D::Attributes& attributes,
+ blink::WebGraphicsContext3D* share_context) {
+ return createOffscreenGraphicsContext3D(attributes, share_context, nullptr);
+}
+
+blink::WebGraphicsContext3D*
+BlinkPlatformImpl::createOffscreenGraphicsContext3D(
+ const blink::WebGraphicsContext3D::Attributes& attributes,
+ blink::WebGraphicsContext3D* share_context,
+ blink::WebGLInfo* gl_info) {
+ return WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext(
+ app_, GURL(attributes.topDocumentURL), attributes, share_context,
+ gl_info);
+}
+
+blink::WebGraphicsContext3D*
+BlinkPlatformImpl::createOffscreenGraphicsContext3D(
+ const blink::WebGraphicsContext3D::Attributes& attributes) {
+ return createOffscreenGraphicsContext3D(attributes, nullptr, nullptr);
+}
+
+blink::WebGraphicsContext3DProvider*
+BlinkPlatformImpl::createSharedOffscreenGraphicsContext3DProvider() {
+ return nullptr;
+}
+
blink::WebData BlinkPlatformImpl::loadResource(const char* resource) {
for (size_t i = 0; i < arraysize(kDataResources); ++i) {
if (!strcmp(resource, kDataResources[i].name)) {
« no previous file with comments | « components/html_viewer/blink_platform_impl.h ('k') | components/html_viewer/html_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698