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

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: send SurfaceRel from Destroy(), hold GLContext ref for cleanup so surface is compatible Created 8 years, 1 month 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 "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h" 18 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h"
17 #include "ui/gfx/size.h" 19 #include "ui/gfx/size.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 const gfx::Rect& end_rect, 90 const gfx::Rect& end_rect,
89 WebKit::WebTextDirection end_direction) OVERRIDE; 91 WebKit::WebTextDirection end_direction) OVERRIDE;
90 virtual void OnAcceleratedCompositingStateChange() OVERRIDE; 92 virtual void OnAcceleratedCompositingStateChange() OVERRIDE;
91 virtual void AcceleratedSurfaceBuffersSwapped( 93 virtual void AcceleratedSurfaceBuffersSwapped(
92 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, 94 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params,
93 int gpu_host_id) OVERRIDE; 95 int gpu_host_id) OVERRIDE;
94 virtual void AcceleratedSurfacePostSubBuffer( 96 virtual void AcceleratedSurfacePostSubBuffer(
95 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, 97 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params,
96 int gpu_host_id) OVERRIDE; 98 int gpu_host_id) OVERRIDE;
97 virtual void AcceleratedSurfaceSuspend() OVERRIDE; 99 virtual void AcceleratedSurfaceSuspend() OVERRIDE;
100 virtual void AcceleratedSurfaceNew(
101 int32 width_in_pixel,
102 int32 height_in_pixel,
103 uint64 surface_id,
104 const std::string& mailbox_name) OVERRIDE;
105 virtual void AcceleratedSurfaceRelease(uint64 surface_id) OVERRIDE;
98 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE; 106 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE;
99 virtual void SetBackground(const SkBitmap& background) OVERRIDE; 107 virtual void SetBackground(const SkBitmap& background) OVERRIDE;
100 virtual void CopyFromCompositingSurface( 108 virtual void CopyFromCompositingSurface(
101 const gfx::Rect& src_subrect, 109 const gfx::Rect& src_subrect,
102 const gfx::Size& dst_size, 110 const gfx::Size& dst_size,
103 const base::Callback<void(bool)>& callback, 111 const base::Callback<void(bool)>& callback,
104 skia::PlatformBitmap* output) OVERRIDE; 112 skia::PlatformBitmap* output) OVERRIDE;
105 virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE; 113 virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE;
106 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE; 114 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE;
107 virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; 115 virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // The most recent texture id that was pushed to the texture layer. 173 // The most recent texture id that was pushed to the texture layer.
166 unsigned int texture_id_in_layer_; 174 unsigned int texture_id_in_layer_;
167 175
168 // The most recent texture size that was pushed to the texture layer. 176 // The most recent texture size that was pushed to the texture layer.
169 gfx::Size texture_size_in_layer_; 177 gfx::Size texture_size_in_layer_;
170 178
171 // The handle for the transport surface (between renderer and browser-side 179 // The handle for the transport surface (between renderer and browser-side
172 // compositor) for this view. 180 // compositor) for this view.
173 gfx::GLSurfaceHandle shared_surface_; 181 gfx::GLSurfaceHandle shared_surface_;
174 182
183 typedef std::map<uint64, std::string> MailboxMap;
184 MailboxMap id_to_mailbox_;
185
186 // The identifier of the previously received frame
187 uint64 current_buffer_id_;
188
175 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); 189 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
176 }; 190 };
177 191
178 } // namespace content 192 } // namespace content
179 193
180 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 194 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698