OLD | NEW |
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 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_GRAPHICS_2D_HOST_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_GRAPHICS_2D_HOST_H_ |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_GRAPHICS_2D_HOST_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_GRAPHICS_2D_HOST_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace cc { | 21 namespace cc { |
22 class SharedBitmap; | 22 class SharedBitmap; |
23 class SingleReleaseCallback; | 23 class SingleReleaseCallback; |
24 class TextureMailbox; | 24 class TextureMailbox; |
25 } | 25 } |
26 | 26 |
27 namespace gfx { | 27 namespace gfx { |
28 class Rect; | 28 class Rect; |
29 } | 29 } |
30 | 30 |
| 31 namespace gpu { |
| 32 struct SyncToken; |
| 33 } |
| 34 |
31 namespace ppapi { | 35 namespace ppapi { |
32 struct ViewData; | 36 struct ViewData; |
33 } | 37 } |
34 | 38 |
35 namespace content { | 39 namespace content { |
36 | 40 |
37 class PepperPluginInstanceImpl; | 41 class PepperPluginInstanceImpl; |
38 class PPB_ImageData_Impl; | 42 class PPB_ImageData_Impl; |
39 class RendererPpapiHost; | 43 class RendererPpapiHost; |
40 | 44 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 // covered logical pixels (aka DIPs). Also scale optional |delta| to logical | 156 // covered logical pixels (aka DIPs). Also scale optional |delta| to logical |
153 // pixels as well for scrolling cases. Returns false for scrolling cases where | 157 // pixels as well for scrolling cases. Returns false for scrolling cases where |
154 // scaling either |op_rect| or |delta| would require scrolling to fall back to | 158 // scaling either |op_rect| or |delta| would require scrolling to fall back to |
155 // invalidation due to rounding errors, true otherwise. | 159 // invalidation due to rounding errors, true otherwise. |
156 static bool ConvertToLogicalPixels(float scale, | 160 static bool ConvertToLogicalPixels(float scale, |
157 gfx::Rect* op_rect, | 161 gfx::Rect* op_rect, |
158 gfx::Point* delta); | 162 gfx::Point* delta); |
159 | 163 |
160 void ReleaseCallback(scoped_ptr<cc::SharedBitmap> bitmap, | 164 void ReleaseCallback(scoped_ptr<cc::SharedBitmap> bitmap, |
161 const gfx::Size& bitmap_size, | 165 const gfx::Size& bitmap_size, |
162 uint32 sync_point, | 166 const gpu::SyncToken& sync_token, |
163 bool lost_resource); | 167 bool lost_resource); |
164 | 168 |
165 RendererPpapiHost* renderer_ppapi_host_; | 169 RendererPpapiHost* renderer_ppapi_host_; |
166 | 170 |
167 scoped_refptr<PPB_ImageData_Impl> image_data_; | 171 scoped_refptr<PPB_ImageData_Impl> image_data_; |
168 | 172 |
169 // Non-owning pointer to the plugin instance this context is currently bound | 173 // Non-owning pointer to the plugin instance this context is currently bound |
170 // to, if any. If the context is currently unbound, this will be NULL. | 174 // to, if any. If the context is currently unbound, this will be NULL. |
171 PepperPluginInstanceImpl* bound_instance_; | 175 PepperPluginInstanceImpl* bound_instance_; |
172 | 176 |
(...skipping 30 matching lines...) Expand all Loading... |
203 scoped_ptr<cc::SharedBitmap> cached_bitmap_; | 207 scoped_ptr<cc::SharedBitmap> cached_bitmap_; |
204 gfx::Size cached_bitmap_size_; | 208 gfx::Size cached_bitmap_size_; |
205 | 209 |
206 friend class PepperGraphics2DHostTest; | 210 friend class PepperGraphics2DHostTest; |
207 DISALLOW_COPY_AND_ASSIGN(PepperGraphics2DHost); | 211 DISALLOW_COPY_AND_ASSIGN(PepperGraphics2DHost); |
208 }; | 212 }; |
209 | 213 |
210 } // namespace content | 214 } // namespace content |
211 | 215 |
212 #endif // CONTENT_RENDERER_PEPPER_PEPPER_GRAPHICS_2D_HOST_H_ | 216 #endif // CONTENT_RENDERER_PEPPER_PEPPER_GRAPHICS_2D_HOST_H_ |
OLD | NEW |