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

Side by Side Diff: content/renderer/pepper/pepper_graphics_2d_host.h

Issue 23866006: Make fullscreen pepper flash create a texture layer with software compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
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 #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"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "ppapi/c/ppb_graphics_2d.h" 14 #include "ppapi/c/ppb_graphics_2d.h"
15 #include "ppapi/host/host_message_context.h" 15 #include "ppapi/host/host_message_context.h"
16 #include "ppapi/host/resource_host.h" 16 #include "ppapi/host/resource_host.h"
17 #include "third_party/WebKit/public/platform/WebCanvas.h" 17 #include "third_party/WebKit/public/platform/WebCanvas.h"
18 18
19 namespace cc { class TextureMailbox; }
20
19 namespace gfx { 21 namespace gfx {
20 class Point; 22 class Point;
21 class Rect; 23 class Rect;
22 } 24 }
23 25
24 namespace content { 26 namespace content {
25 27
26 class PepperPluginInstanceImpl; 28 class PepperPluginInstanceImpl;
27 class PPB_ImageData_Impl; 29 class PPB_ImageData_Impl;
28 class RendererPpapiHost; 30 class RendererPpapiHost;
(...skipping 21 matching lines...) Expand all
50 // Assciates this device with the given plugin instance. You can pass NULL 52 // Assciates this device with the given plugin instance. You can pass NULL
51 // to clear the existing device. Returns true on success. In this case, a 53 // to clear the existing device. Returns true on success. In this case, a
52 // repaint of the page will also be scheduled. Failure means that the device 54 // repaint of the page will also be scheduled. Failure means that the device
53 // is already bound to a different instance, and nothing will happen. 55 // is already bound to a different instance, and nothing will happen.
54 bool BindToInstance(PepperPluginInstanceImpl* new_instance); 56 bool BindToInstance(PepperPluginInstanceImpl* new_instance);
55 // Paints the current backing store to the web page. 57 // Paints the current backing store to the web page.
56 void Paint(WebKit::WebCanvas* canvas, 58 void Paint(WebKit::WebCanvas* canvas,
57 const gfx::Rect& plugin_rect, 59 const gfx::Rect& plugin_rect,
58 const gfx::Rect& paint_rect); 60 const gfx::Rect& paint_rect);
59 61
62 bool PrepareTextureMailbox(cc::TextureMailbox* mailbox);
63 void AttachedToNewLayer();
64
60 // Notifications about the view's progress painting. See PluginInstance. 65 // Notifications about the view's progress painting. See PluginInstance.
61 // These messages are used to send Flush callbacks to the plugin. 66 // These messages are used to send Flush callbacks to the plugin.
62 void ViewWillInitiatePaint(); 67 void ViewWillInitiatePaint();
63 void ViewInitiatedPaint(); 68 void ViewInitiatedPaint();
64 void ViewFlushedPaint(); 69 void ViewFlushedPaint();
65 70
66 void SetScale(float scale); 71 void SetScale(float scale);
67 float GetScale() const; 72 float GetScale() const;
68 bool IsAlwaysOpaque() const; 73 bool IsAlwaysOpaque() const;
69 PPB_ImageData_Impl* ImageData(); 74 PPB_ImageData_Impl* ImageData();
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // Set to the scale between what the plugin considers to be one pixel and one 167 // Set to the scale between what the plugin considers to be one pixel and one
163 // DIP 168 // DIP
164 float scale_; 169 float scale_;
165 170
166 base::WeakPtrFactory<PepperGraphics2DHost> weak_ptr_factory_; 171 base::WeakPtrFactory<PepperGraphics2DHost> weak_ptr_factory_;
167 172
168 ppapi::host::ReplyMessageContext flush_reply_context_; 173 ppapi::host::ReplyMessageContext flush_reply_context_;
169 174
170 bool is_running_in_process_; 175 bool is_running_in_process_;
171 176
177 bool texture_mailbox_modified_;
178
172 friend class PepperGraphics2DHostTest; 179 friend class PepperGraphics2DHostTest;
173 DISALLOW_COPY_AND_ASSIGN(PepperGraphics2DHost); 180 DISALLOW_COPY_AND_ASSIGN(PepperGraphics2DHost);
174 }; 181 };
175 182
176 } // namespace content 183 } // namespace content
177 184
178 #endif // CONTENT_RENDERER_PEPPER_PEPPER_GRAPHICS_2D_HOST_H_ 185 #endif // CONTENT_RENDERER_PEPPER_PEPPER_GRAPHICS_2D_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698