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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_win.cc

Issue 10815070: Support copying a partial rectangle region from the compositing surface on Aura and GTK. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 years, 5 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 #include "content/browser/renderer_host/render_widget_host_view_win.h" 5 #include "content/browser/renderer_host/render_widget_host_view_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <peninputpanel_i.c> 9 #include <peninputpanel_i.c>
10 #include <stack> 10 #include <stack>
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 } 1190 }
1191 } 1191 }
1192 } 1192 }
1193 1193
1194 BackingStore* RenderWidgetHostViewWin::AllocBackingStore( 1194 BackingStore* RenderWidgetHostViewWin::AllocBackingStore(
1195 const gfx::Size& size) { 1195 const gfx::Size& size) {
1196 return new BackingStoreWin(render_widget_host_, size); 1196 return new BackingStoreWin(render_widget_host_, size);
1197 } 1197 }
1198 1198
1199 void RenderWidgetHostViewWin::CopyFromCompositingSurface( 1199 void RenderWidgetHostViewWin::CopyFromCompositingSurface(
1200 const gfx::Size& size, 1200 const gfx::Rect& src_subrect,
1201 const gfx::Size& dst_size,
1201 const base::Callback<void(bool)>& callback, 1202 const base::Callback<void(bool)>& callback,
1202 skia::PlatformCanvas* output) { 1203 skia::PlatformCanvas* output) {
1203 base::ScopedClosureRunner scoped_callback_runner(base::Bind(callback, false)); 1204 base::ScopedClosureRunner scoped_callback_runner(base::Bind(callback, false));
1205 // TODO(mazda): Support copying a partial rectangle from the compositing
1206 // surface with |src_subrect| (http://crbug.com/118571).
1207 if (!src_subrect.IsEmpty()) {
1208 NOTIMPLEMENTED();
1209 return;
1210 }
1211
1204 if (!accelerated_surface_.get()) 1212 if (!accelerated_surface_.get())
1205 return; 1213 return;
1206 1214
1207 if (size.IsEmpty()) 1215 if (dst_size.IsEmpty())
1208 return; 1216 return;
1209 1217
1210 if (!output->initialize(size.width(), size.height(), true)) 1218 if (!output->initialize(dst_size.width(), dst_size.height(), true))
1211 return; 1219 return;
1212 1220
1213 const bool result = accelerated_surface_->CopyTo( 1221 const bool result = accelerated_surface_->CopyTo(
1214 size, output->getTopDevice()->accessBitmap(true).getPixels()); 1222 dst_size, output->getTopDevice()->accessBitmap(true).getPixels());
1215 scoped_callback_runner.Release(); 1223 scoped_callback_runner.Release();
1216 callback.Run(result); 1224 callback.Run(result);
1217 } 1225 }
1218 1226
1219 void RenderWidgetHostViewWin::SetBackground(const SkBitmap& background) { 1227 void RenderWidgetHostViewWin::SetBackground(const SkBitmap& background) {
1220 RenderWidgetHostViewBase::SetBackground(background); 1228 RenderWidgetHostViewBase::SetBackground(background);
1221 render_widget_host_->SetBackground(background); 1229 render_widget_host_->SetBackground(background);
1222 } 1230 }
1223 1231
1224 void RenderWidgetHostViewWin::ProcessTouchAck( 1232 void RenderWidgetHostViewWin::ProcessTouchAck(
(...skipping 1937 matching lines...) Expand 10 before | Expand all | Expand 10 after
3162 // receive a focus change in the context of a pointer down message, it means 3170 // receive a focus change in the context of a pointer down message, it means
3163 // that the pointer down message occurred on the edit field and we should 3171 // that the pointer down message occurred on the edit field and we should
3164 // display the on screen keyboard 3172 // display the on screen keyboard
3165 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) 3173 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_)
3166 DisplayOnScreenKeyboardIfNeeded(); 3174 DisplayOnScreenKeyboardIfNeeded();
3167 received_focus_change_after_pointer_down_ = false; 3175 received_focus_change_after_pointer_down_ = false;
3168 pointer_down_context_ = false; 3176 pointer_down_context_ = false;
3169 } 3177 }
3170 3178
3171 } // namespace content 3179 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_win.h ('k') | content/browser/renderer_host/test_render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698