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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.h

Issue 11194042: Implement TextureImageTransportSurface using texture mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
7 7
8 #include <map>
9
8 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
9 #include "base/i18n/rtl.h" 11 #include "base/i18n/rtl.h"
10 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
11 #include "base/process.h" 13 #include "base/process.h"
12 #include "content/browser/renderer_host/ime_adapter_android.h" 14 #include "content/browser/renderer_host/ime_adapter_android.h"
13 #include "content/browser/renderer_host/render_widget_host_view_base.h" 15 #include "content/browser/renderer_host/render_widget_host_view_base.h"
14 #include "third_party/skia/include/core/SkColor.h" 16 #include "third_party/skia/include/core/SkColor.h"
15 #include "third_party/WebKit/Source/Platform/chromium/public/WebExternalTextureL ayer.h" 17 #include "third_party/WebKit/Source/Platform/chromium/public/WebExternalTextureL ayer.h"
16 #include "ui/gfx/size.h" 18 #include "ui/gfx/size.h"
17 19
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 const gfx::Rect& end_rect, 88 const gfx::Rect& end_rect,
87 WebKit::WebTextDirection end_direction) OVERRIDE; 89 WebKit::WebTextDirection end_direction) OVERRIDE;
88 virtual void OnAcceleratedCompositingStateChange() OVERRIDE; 90 virtual void OnAcceleratedCompositingStateChange() OVERRIDE;
89 virtual void AcceleratedSurfaceBuffersSwapped( 91 virtual void AcceleratedSurfaceBuffersSwapped(
90 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, 92 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params,
91 int gpu_host_id) OVERRIDE; 93 int gpu_host_id) OVERRIDE;
92 virtual void AcceleratedSurfacePostSubBuffer( 94 virtual void AcceleratedSurfacePostSubBuffer(
93 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, 95 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params,
94 int gpu_host_id) OVERRIDE; 96 int gpu_host_id) OVERRIDE;
95 virtual void AcceleratedSurfaceSuspend() OVERRIDE; 97 virtual void AcceleratedSurfaceSuspend() OVERRIDE;
98 virtual void AcceleratedSurfaceNew(int32 width_in_pixel,
99 int32 height_in_pixel,
100 uint64 surface_id,
101 const std::string& mailbox_name) OVERRIDE;
102 virtual void AcceleratedSurfaceRelease(uint64 surface_id) OVERRIDE;
96 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE; 103 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE;
97 virtual void SetBackground(const SkBitmap& background) OVERRIDE; 104 virtual void SetBackground(const SkBitmap& background) OVERRIDE;
98 virtual void CopyFromCompositingSurface( 105 virtual void CopyFromCompositingSurface(
99 const gfx::Rect& src_subrect, 106 const gfx::Rect& src_subrect,
100 const gfx::Size& dst_size, 107 const gfx::Size& dst_size,
101 const base::Callback<void(bool)>& callback, 108 const base::Callback<void(bool)>& callback,
102 skia::PlatformBitmap* output) OVERRIDE; 109 skia::PlatformBitmap* output) OVERRIDE;
103 virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE; 110 virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE;
104 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE; 111 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE;
105 virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; 112 virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // Body background color of the underlying document. 162 // Body background color of the underlying document.
156 SkColor cached_background_color_; 163 SkColor cached_background_color_;
157 164
158 // The texture layer for this view when using browser-side compositing. 165 // The texture layer for this view when using browser-side compositing.
159 scoped_ptr<WebKit::WebExternalTextureLayer> texture_layer_; 166 scoped_ptr<WebKit::WebExternalTextureLayer> texture_layer_;
160 167
161 // The handle for the transport surface (between renderer and browser-side 168 // The handle for the transport surface (between renderer and browser-side
162 // compositor) for this view. 169 // compositor) for this view.
163 gfx::GLSurfaceHandle shared_surface_; 170 gfx::GLSurfaceHandle shared_surface_;
164 171
172 struct TextureInfo {
173 TextureInfo()
174 : id(0) {}
175
176 uint32 id;
177 scoped_array<signed char> mailbox_name;
178 };
179 typedef std::map<uint64, TextureInfo*> TextureMap;
180 // Maps a texture image transport buffer identifier to a texture that
181 // we created to host it.
182 TextureMap id_to_texture_map_;
183
184 // The identifier of the previously received frame
185 uint64 current_buffer_id_;
186
165 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); 187 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
166 }; 188 };
167 189
168 } // namespace content 190 } // namespace content
169 191
170 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 192 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698