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

Side by Side Diff: ppapi/cpp/instance.cc

Issue 7737013: Move PPAPI graphics3d and opengles interfaces out of Dev. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/cpp/instance.h ('k') | ppapi/examples/gles2/gles2.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ppapi/cpp/instance.h" 5 #include "ppapi/cpp/instance.h"
6 6
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/ppb_input_event.h" 8 #include "ppapi/c/ppb_input_event.h"
9 #include "ppapi/c/ppb_instance.h" 9 #include "ppapi/c/ppb_instance.h"
10 #include "ppapi/c/ppb_messaging.h" 10 #include "ppapi/c/ppb_messaging.h"
11 #include "ppapi/cpp/dev/graphics_3d_dev.h"
12 #include "ppapi/cpp/dev/surface_3d_dev.h" 11 #include "ppapi/cpp/dev/surface_3d_dev.h"
13 #include "ppapi/cpp/graphics_2d.h" 12 #include "ppapi/cpp/graphics_2d.h"
13 #include "ppapi/cpp/graphics_3d.h"
14 #include "ppapi/cpp/image_data.h" 14 #include "ppapi/cpp/image_data.h"
15 #include "ppapi/cpp/logging.h" 15 #include "ppapi/cpp/logging.h"
16 #include "ppapi/cpp/module.h" 16 #include "ppapi/cpp/module.h"
17 #include "ppapi/cpp/module_impl.h" 17 #include "ppapi/cpp/module_impl.h"
18 #include "ppapi/cpp/point.h" 18 #include "ppapi/cpp/point.h"
19 #include "ppapi/cpp/resource.h" 19 #include "ppapi/cpp/resource.h"
20 #include "ppapi/cpp/var.h" 20 #include "ppapi/cpp/var.h"
21 21
22 namespace pp { 22 namespace pp {
23 23
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 return; 75 return;
76 } 76 }
77 77
78 bool Instance::BindGraphics(const Graphics2D& graphics) { 78 bool Instance::BindGraphics(const Graphics2D& graphics) {
79 if (!has_interface<PPB_Instance>()) 79 if (!has_interface<PPB_Instance>())
80 return false; 80 return false;
81 return PP_ToBool(get_interface<PPB_Instance>()->BindGraphics( 81 return PP_ToBool(get_interface<PPB_Instance>()->BindGraphics(
82 pp_instance(), graphics.pp_resource())); 82 pp_instance(), graphics.pp_resource()));
83 } 83 }
84 84
85 bool Instance::BindGraphics(const Graphics3D_Dev& graphics) { 85 bool Instance::BindGraphics(const Graphics3D& graphics) {
86 if (!has_interface<PPB_Instance>()) 86 if (!has_interface<PPB_Instance>())
87 return false; 87 return false;
88 return PP_ToBool(get_interface<PPB_Instance>()->BindGraphics( 88 return PP_ToBool(get_interface<PPB_Instance>()->BindGraphics(
89 pp_instance(), graphics.pp_resource())); 89 pp_instance(), graphics.pp_resource()));
90 } 90 }
91 91
92 bool Instance::BindGraphics(const Surface3D_Dev& graphics) { 92 bool Instance::BindGraphics(const Surface3D_Dev& graphics) {
93 if (!has_interface<PPB_Instance>()) 93 if (!has_interface<PPB_Instance>())
94 return false; 94 return false;
95 return PP_ToBool(get_interface<PPB_Instance>()->BindGraphics( 95 return PP_ToBool(get_interface<PPB_Instance>()->BindGraphics(
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 if (!that) 164 if (!that)
165 return NULL; 165 return NULL;
166 InterfaceNameToObjectMap::iterator found = 166 InterfaceNameToObjectMap::iterator found =
167 that->interface_name_to_objects_.find(interface_name); 167 that->interface_name_to_objects_.find(interface_name);
168 if (found == that->interface_name_to_objects_.end()) 168 if (found == that->interface_name_to_objects_.end())
169 return NULL; 169 return NULL;
170 return found->second; 170 return found->second;
171 } 171 }
172 172
173 } // namespace pp 173 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/instance.h ('k') | ppapi/examples/gles2/gles2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698