diff options
author | alokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-17 17:08:14 +0000 |
---|---|---|
committer | alokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-17 17:08:14 +0000 |
commit | 2b4d973c90f7e7e81ef3cd1896f4e3e1ca8ba098 (patch) | |
tree | 39cc93f3450cbbdeca602c8a0fdef14328fc4554 /webkit/tools/pepper_test_plugin/demo_3d.cc | |
parent | c9e1979455bd83b1d3c6d95be4c84cc7153ced7f (diff) | |
download | chromium_src-2b4d973c90f7e7e81ef3cd1896f4e3e1ca8ba098.zip chromium_src-2b4d973c90f7e7e81ef3cd1896f4e3e1ca8ba098.tar.gz chromium_src-2b4d973c90f7e7e81ef3cd1896f4e3e1ca8ba098.tar.bz2 |
Changed the pepper test plugin to render a red triangle on a black background. Also removed the continuous draw loop.
Review URL: http://codereview.chromium.org/1052004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41846 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/pepper_test_plugin/demo_3d.cc')
-rw-r--r-- | webkit/tools/pepper_test_plugin/demo_3d.cc | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/webkit/tools/pepper_test_plugin/demo_3d.cc b/webkit/tools/pepper_test_plugin/demo_3d.cc new file mode 100644 index 0000000..2ffb757 --- /dev/null +++ b/webkit/tools/pepper_test_plugin/demo_3d.cc @@ -0,0 +1,35 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "webkit/tools/pepper_test_plugin/demo_3d.h" + +#if !defined(INDEPENDENT_PLUGIN) +namespace pepper { +Demo3D::Demo3D() { + esInitContext(&context_); + memset(&user_data_, 0, sizeof(HTUserData)); + context_.userData = &user_data_; +} + +Demo3D::~Demo3D() { +} + +void Demo3D::SetWindowSize(int width, int height) { + context_.width = width; + context_.height = height; +} + +bool Demo3D::InitGL() { + return htInit(&context_); +} + +void Demo3D::ReleaseGL() { + htShutDown(&context_); +} + +void Demo3D::Draw() { + htDraw(&context_); +} +} // namespace pepper +#endif // INDEPENDENT_PLUGIN |