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

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 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 343
344 // Paint a "hole" in the canvas so that the render of the web page is on 344 // Paint a "hole" in the canvas so that the render of the web page is on
345 // top of whatever else has already been painted in the views hierarchy. 345 // top of whatever else has already been painted in the views hierarchy.
346 // Later views might still get to paint on top. 346 // Later views might still get to paint on top.
347 canvas->FillRectInt(SK_ColorBLACK, 0, 0, kMaxWindowWidth, kMaxWindowHeight, 347 canvas->FillRectInt(SK_ColorBLACK, 0, 0, kMaxWindowWidth, kMaxWindowHeight,
348 SkXfermode::kClear_Mode); 348 SkXfermode::kClear_Mode);
349 349
350 // Don't do any painting if the GPU process is rendering directly 350 // Don't do any painting if the GPU process is rendering directly
351 // into the View. 351 // into the View.
352 RenderWidgetHost* render_widget_host = GetRenderWidgetHost(); 352 RenderWidgetHost* render_widget_host = GetRenderWidgetHost();
353 if (render_widget_host->is_gpu_rendering_active()) { 353 if (render_widget_host->is_accelerated_compositing_active()) {
354 return; 354 return;
355 } 355 }
356 356
357 GdkWindow* window = native_view()->window; 357 GdkWindow* window = native_view()->window;
358 DCHECK(!about_to_validate_and_paint_); 358 DCHECK(!about_to_validate_and_paint_);
359 359
360 // TODO(anicolao): get the damage somehow 360 // TODO(anicolao): get the damage somehow
361 // invalid_rect_ = damage_rect; 361 // invalid_rect_ = damage_rect;
362 invalid_rect_ = bounds(); 362 invalid_rect_ = bounds();
363 gfx::Point origin; 363 gfx::Point origin;
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 } 596 }
597 597
598 bool RenderWidgetHostViewViews::ContainsNativeView( 598 bool RenderWidgetHostViewViews::ContainsNativeView(
599 gfx::NativeView native_view) const { 599 gfx::NativeView native_view) const {
600 // TODO(port) 600 // TODO(port)
601 NOTREACHED() << 601 NOTREACHED() <<
602 "RenderWidgetHostViewViews::ContainsNativeView not implemented."; 602 "RenderWidgetHostViewViews::ContainsNativeView not implemented.";
603 return false; 603 return false;
604 } 604 }
605 605
606 void RenderWidgetHostViewViews::AcceleratedCompositingActivated(bool activated) { 606 void RenderWidgetHostViewViews::AcceleratedCompositingActivated(
607 bool activated) {
607 // TODO(anicolao): figure out if we need something here 608 // TODO(anicolao): figure out if we need something here
608 if (activated) 609 if (activated)
609 NOTIMPLEMENTED(); 610 NOTIMPLEMENTED();
610 } 611 }
611 612
612 WebKit::WebMouseEvent RenderWidgetHostViewViews::WebMouseEventFromViewsEvent( 613 WebKit::WebMouseEvent RenderWidgetHostViewViews::WebMouseEventFromViewsEvent(
613 const views::MouseEvent& event) { 614 const views::MouseEvent& event) {
614 WebKit::WebMouseEvent wmevent; 615 WebKit::WebMouseEvent wmevent;
615 InitializeWebMouseEventFromViewsEvent(event, GetPosition(), &wmevent); 616 InitializeWebMouseEventFromViewsEvent(event, GetPosition(), &wmevent);
616 617
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 } 719 }
719 720
720 // static 721 // static
721 RenderWidgetHostView* 722 RenderWidgetHostView*
722 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( 723 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView(
723 gfx::NativeView widget) { 724 gfx::NativeView widget) {
724 gpointer user_data = g_object_get_data(G_OBJECT(widget), 725 gpointer user_data = g_object_get_data(G_OBJECT(widget),
725 kRenderWidgetHostViewKey); 726 kRenderWidgetHostViewKey);
726 return reinterpret_cast<RenderWidgetHostView*>(user_data); 727 return reinterpret_cast<RenderWidgetHostView*>(user_data);
727 } 728 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698