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

Unified Diff: gpu/demos/pepper_gpu_demo.html

Issue 7529009: Updated demo to use resizable plugin element. This exercises the new PPB_Graphics3D_Dev::Resize()... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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 | « gpu/demos/gles2_book/example.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/demos/pepper_gpu_demo.html
===================================================================
--- gpu/demos/pepper_gpu_demo.html (revision 94518)
+++ gpu/demos/pepper_gpu_demo.html (working copy)
@@ -1,12 +1,44 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Pepper GPU Demo</title>
+<style>
+ #container
+ {
+ margin: auto;
+ padding: 0px;
+ width: 90%;
+ height: 90%;
+ border-style: solid;
+ }
+ #plugin
+ {
+ margin: 0;
+ border: 0;
+ }
+</style>
+
+<script type="text/javascript">
+var container;
+var plugin;
+
+function resizePlugin() {
+ plugin.width = container.clientWidth;
+ plugin.height = container.clientHeight;
+};
+
+function init() {
+ container = document.getElementById('container');
+ plugin = document.getElementById('plugin');
+
+ window.onresize = resizePlugin;
+ resizePlugin();
+}
+</script>
</head>
-<body style="background-color:Silver; -webkit-perspective: 1000;">
-
-<h1>Pepper GPU Demo</h1>
-<embed id="plugin" type="pepper-application/x-gpu-demo" width="512" height="512" style="position:absolute; top: 30px; -webkit-transform: rotateY(30deg);" />
-<p style="position:absolute; top: 256px;">Text on top</p>
+<body onload="init();">
+<div id="container">
+ <embed id="plugin" type="pepper-application/x-gpu-demo" />
+</div>
</body>
</html>
« no previous file with comments | « gpu/demos/gles2_book/example.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698