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

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

Issue 1881603002: Added SetLayerTransform to PPAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/graphics_2d.h" 5 #include "ppapi/cpp/graphics_2d.h"
6 6
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/ppb_graphics_2d.h" 8 #include "ppapi/c/ppb_graphics_2d.h"
9 #include "ppapi/cpp/completion_callback.h" 9 #include "ppapi/cpp/completion_callback.h"
10 #include "ppapi/cpp/image_data.h" 10 #include "ppapi/cpp/image_data.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 return PP_ToBool(get_interface<PPB_Graphics2D_1_1>()->SetScale(pp_resource(), 145 return PP_ToBool(get_interface<PPB_Graphics2D_1_1>()->SetScale(pp_resource(),
146 scale)); 146 scale));
147 } 147 }
148 148
149 float Graphics2D::GetScale() { 149 float Graphics2D::GetScale() {
150 if (!has_interface<PPB_Graphics2D_1_1>()) 150 if (!has_interface<PPB_Graphics2D_1_1>())
151 return 1.0f; 151 return 1.0f;
152 return get_interface<PPB_Graphics2D_1_1>()->GetScale(pp_resource()); 152 return get_interface<PPB_Graphics2D_1_1>()->GetScale(pp_resource());
153 } 153 }
154 154
155 bool Graphics2D::SetLayerTransform(float scale,
156 const Point& origin,
157 const Point& transform) {
158 if (!has_interface<PPB_Graphics2D_1_1>())
159 return false;
160 return PP_ToBool(get_interface<PPB_Graphics2D_1_1>()->SetLayerTransform(
161 pp_resource(),
wjmaclean 2016/04/13 14:47:19 Indenting is wrong here.
alessandroa 2016/04/21 15:39:21 Acknowledged.
162 scale,
163 &origin.pp_point(),
164 &transform.pp_point()));
165 }
166
167
155 } // namespace pp 168 } // namespace pp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698