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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_views.cc

Issue 4815001: Use inner HWND for accelerated rendering on windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/renderer_host/render_widget_host_view_views.h" 5 #include "chrome/browser/renderer_host/render_widget_host_view_views.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "app/keyboard_code_conversion_gtk.h" 10 #include "app/keyboard_code_conversion_gtk.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 270
271 void RenderWidgetHostViewViews::SetBackground(const SkBitmap& background) { 271 void RenderWidgetHostViewViews::SetBackground(const SkBitmap& background) {
272 RenderWidgetHostView::SetBackground(background); 272 RenderWidgetHostView::SetBackground(background);
273 host_->Send(new ViewMsg_SetBackground(host_->routing_id(), background)); 273 host_->Send(new ViewMsg_SetBackground(host_->routing_id(), background));
274 } 274 }
275 275
276 void RenderWidgetHostViewViews::Paint(gfx::Canvas* canvas) { 276 void RenderWidgetHostViewViews::Paint(gfx::Canvas* canvas) {
277 // Don't do any painting if the GPU process is rendering directly 277 // Don't do any painting if the GPU process is rendering directly
278 // into the View. 278 // into the View.
279 RenderWidgetHost* render_widget_host = GetRenderWidgetHost(); 279 RenderWidgetHost* render_widget_host = GetRenderWidgetHost();
280 if (render_widget_host->is_gpu_rendering_active()) { 280 if (render_widget_host->is_accelerated_compositing_active()) {
281 return; 281 return;
282 } 282 }
283 283
284 GdkWindow* window = native_view()->window; 284 GdkWindow* window = native_view()->window;
285 DCHECK(!about_to_validate_and_paint_); 285 DCHECK(!about_to_validate_and_paint_);
286 286
287 // TODO(anicolao): get the damage somehow 287 // TODO(anicolao): get the damage somehow
288 // invalid_rect_ = damage_rect; 288 // invalid_rect_ = damage_rect;
289 invalid_rect_ = bounds(); 289 invalid_rect_ = bounds();
290 about_to_validate_and_paint_ = true; 290 about_to_validate_and_paint_ = true;
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 } 559 }
560 560
561 // static 561 // static
562 RenderWidgetHostView* 562 RenderWidgetHostView*
563 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( 563 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView(
564 gfx::NativeView widget) { 564 gfx::NativeView widget) {
565 gpointer user_data = g_object_get_data(G_OBJECT(widget), 565 gpointer user_data = g_object_get_data(G_OBJECT(widget),
566 kRenderWidgetHostViewKey); 566 kRenderWidgetHostViewKey);
567 return reinterpret_cast<RenderWidgetHostView*>(user_data); 567 return reinterpret_cast<RenderWidgetHostView*>(user_data);
568 } 568 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698