Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 * found in the LICENSE file. | |
| 4 */ | |
| 5 | |
| 6 /* This file contains the <code>PPB_Graphics2D_Private</code> interface. */ | |
| 7 label Chrome { | |
| 8 M22 = 0.1 | |
| 9 }; | |
| 10 | |
| 11 /* PPB_Graphics2D_Private interface */ | |
| 12 interface PPB_Graphics2D_Private { | |
| 13 /** | |
| 14 * Create() creates a 2D graphics context. The returned graphics context will | |
| 15 * not be bound to the module instance on creation (call BindGraphics() on | |
| 16 * the module instance to bind the returned graphics context to the module | |
| 17 * instance). | |
| 18 * | |
| 19 * @param[in] instance The module instance. | |
| 20 * @param[in] size The size of the graphic context. | |
| 21 * @param[in] is_always_opaque Set the <code>is_always_opaque</code> flag to | |
| 22 * <code>PP_TRUE</code> if you know that you will be painting only opaque | |
| 23 * data to this context. This option will disable blending when compositing | |
| 24 * the module with the web page, which might give higher performance on some | |
| 25 * computers. | |
| 26 * | |
| 27 * If you set <code>is_always_opaque</code>, your alpha channel should always | |
| 28 * be set to 0xFF or there may be painting artifacts. The alpha values | |
| 29 * overwrite the destination alpha values without blending when | |
| 30 * <code>is_always_opaque</code> is true. | |
| 31 * | |
| 32 * @param[in] scale The scaling factor between pixels in this context and | |
| 33 * DIPs. For rendering at device resolution, this will typically be equal to | |
| 34 * the device scale of the view resource passed to DidChangeView. | |
| 35 * For example, if the view resource passed to DidChangeView has a rectangle | |
| 36 * of (w=200, h=100) and a device scale of 2.0, one would call Create with a | |
| 37 * size of (w=400, h=200) and a scaler of 2.0 then treat each pixel in the | |
| 38 * context as a single device pixel. | |
| 39 * | |
| 40 * @return A <code>PP_Resource</code> containing the 2D graphics context if | |
| 41 * successful or 0 if unsuccessful. | |
| 42 */ | |
| 43 PP_Resource Create( | |
|
brettw
2012/06/18 21:17:24
This is a bit confusing because normally if I see
Josh Horwich
2012/06/19 02:01:04
Done.
| |
| 44 [in] PP_Instance instance, | |
| 45 [in] PP_Size size, | |
| 46 [in] PP_Bool is_always_opaque, | |
| 47 [in] float_t scale); | |
| 48 }; | |
| 49 | |
| OLD | NEW |