diff options
author | Andras Becsi <andras.becsi@digia.com> | 2013-12-11 21:33:03 +0100 |
---|---|---|
committer | Andras Becsi <andras.becsi@digia.com> | 2013-12-13 12:34:07 +0100 |
commit | f2a33ff9cbc6d19943f1c7fbddd1f23d23975577 (patch) | |
tree | 0586a32aa390ade8557dfd6b4897f43a07449578 /chromium/ui/surface | |
parent | 5362912cdb5eea702b68ebe23702468d17c3017a (diff) | |
download | qtwebengine-chromium-f2a33ff9cbc6d19943f1c7fbddd1f23d23975577.tar.gz |
Update Chromium to branch 1650 (31.0.1650.63)
Change-Id: I57d8c832eaec1eb2364e0a8e7352a6dd354db99f
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'chromium/ui/surface')
-rw-r--r-- | chromium/ui/surface/accelerated_surface_win.cc | 30 | ||||
-rw-r--r-- | chromium/ui/surface/accelerated_surface_win.h | 8 | ||||
-rw-r--r-- | chromium/ui/surface/transport_dib.h | 5 | ||||
-rw-r--r-- | chromium/ui/surface/transport_dib_gtk.cc | 2 |
4 files changed, 14 insertions, 31 deletions
diff --git a/chromium/ui/surface/accelerated_surface_win.cc b/chromium/ui/surface/accelerated_surface_win.cc index 3b86db01ad4..15d78c00ac3 100644 --- a/chromium/ui/surface/accelerated_surface_win.cc +++ b/chromium/ui/surface/accelerated_surface_win.cc @@ -8,8 +8,8 @@ #include <algorithm> #include "base/bind.h" -#include "base/bind_helpers.h" #include "base/callback.h" +#include "base/callback_helpers.h" #include "base/command_line.h" #include "base/debug/trace_event.h" #include "base/files/file_path.h" @@ -25,11 +25,11 @@ #include "media/base/video_frame.h" #include "media/base/video_util.h" #include "third_party/skia/include/core/SkBitmap.h" -#include "ui/base/latency_info.h" -#include "ui/base/win/dpi.h" -#include "ui/base/win/hwnd_util.h" #include "ui/base/win/shell.h" +#include "ui/events/latency_info.h" #include "ui/gfx/rect.h" +#include "ui/gfx/win/dpi.h" +#include "ui/gfx/win/hwnd_util.h" #include "ui/gl/gl_switches.h" #include "ui/surface/accelerated_surface_transformer_win.h" #include "ui/surface/d3d9_utils_win.h" @@ -332,12 +332,6 @@ void AcceleratedPresenterMap::RemovePresenter( scoped_refptr<AcceleratedPresenter> AcceleratedPresenterMap::GetPresenter( gfx::PluginWindowHandle window) { base::AutoLock locked(lock_); - -#if defined(USE_AURA) - if (!window) - return presenters_.begin()->second; -#endif - PresenterMap::iterator it = presenters_.find(window); if (it == presenters_.end()) return scoped_refptr<AcceleratedPresenter>(); @@ -672,13 +666,6 @@ void AcceleratedPresenter::ResetPresentThread( quantized_size_ = gfx::Size(); } -#if defined(USE_AURA) -void AcceleratedPresenter::SetNewTargetWindow(gfx::PluginWindowHandle window) { - window_ = window; - swap_chain_ = NULL; -} -#endif - AcceleratedPresenter::~AcceleratedPresenter() { } @@ -728,15 +715,16 @@ void AcceleratedPresenter::DoPresentAndAcknowledge( return; } +#if !defined(USE_AURA) // If the window is a different size than the swap chain that is being // presented then drop the frame. gfx::Size window_size = GetWindowSize(); bool size_mismatch = size != window_size; - if (ui::IsInHighDPIMode()) { + if (gfx::IsInHighDPIMode()) { // Check if the size mismatch is within allowable round off or truncation // error. - gfx::Size dip_size = ui::win::ScreenToDIPSize(window_size); - gfx::Size pixel_size = ui::win::DIPToScreenSize(dip_size); + gfx::Size dip_size = gfx::win::ScreenToDIPSize(window_size); + gfx::Size pixel_size = gfx::win::DIPToScreenSize(dip_size); size_mismatch = abs(window_size.width() - size.width()) > abs(window_size.width() - pixel_size.width()) || abs(window_size.height() - size.height()) > @@ -750,7 +738,7 @@ void AcceleratedPresenter::DoPresentAndAcknowledge( "windowheight", window_size.height()); return; } - +#endif // Round up size so the swap chain is not continuously resized with the // surface, which could lead to memory fragmentation. const int kRound = 64; diff --git a/chromium/ui/surface/accelerated_surface_win.h b/chromium/ui/surface/accelerated_surface_win.h index 357fff36733..7c4164b469b 100644 --- a/chromium/ui/surface/accelerated_surface_win.h +++ b/chromium/ui/surface/accelerated_surface_win.h @@ -14,7 +14,7 @@ #include "base/synchronization/waitable_event.h" #include "base/time/time.h" #include "base/win/scoped_comptr.h" -#include "ui/base/latency_info.h" +#include "ui/events/latency_info.h" #include "ui/gfx/native_widget_types.h" #include "ui/gfx/size.h" #include "ui/surface/surface_export.h" @@ -89,12 +89,6 @@ class SURFACE_EXPORT AcceleratedPresenter // the given present thread. void ResetPresentThread(PresentThread* present_thread); -#if defined(USE_AURA) - // TODO(scottmg): This is a temporary hack until we have a two-worlds ash/aura - // separation. - void SetNewTargetWindow(gfx::PluginWindowHandle window); -#endif - private: friend class base::RefCountedThreadSafe<AcceleratedPresenter>; diff --git a/chromium/ui/surface/transport_dib.h b/chromium/ui/surface/transport_dib.h index 1d5410df25d..7ec7bb815f7 100644 --- a/chromium/ui/surface/transport_dib.h +++ b/chromium/ui/surface/transport_dib.h @@ -16,6 +16,7 @@ #include <windows.h> #elif defined(TOOLKIT_GTK) #include "ui/base/x/x11_util.h" +#include "ui/gfx/x/x11_types.h" #endif class SkCanvas; @@ -189,7 +190,7 @@ class SURFACE_EXPORT TransportDIB { #if defined(TOOLKIT_GTK) // Map the shared memory into the X server and return an id for the shared // segment. - XID MapToX(Display* connection); + XID MapToX(XDisplay* connection); void IncreaseInFlightCounter() { inflight_counter_++; } // Decreases the inflight counter, and deletes the transport DIB if it is @@ -211,7 +212,7 @@ class SURFACE_EXPORT TransportDIB { Id key_; // SysV shared memory id void* address_; // mapped address XSharedMemoryId x_shm_; // X id for the shared segment - Display* display_; // connection to the X server + XDisplay* display_; // connection to the X server size_t inflight_counter_; // How many requests to the X server are in flight bool detached_; // If true, delete the transport DIB when it is idle #else diff --git a/chromium/ui/surface/transport_dib_gtk.cc b/chromium/ui/surface/transport_dib_gtk.cc index 31f651328a0..61ec624c065 100644 --- a/chromium/ui/surface/transport_dib_gtk.cc +++ b/chromium/ui/surface/transport_dib_gtk.cc @@ -133,7 +133,7 @@ TransportDIB::Handle TransportDIB::handle() const { return key_.shmkey; } -XID TransportDIB::MapToX(Display* display) { +XID TransportDIB::MapToX(XDisplay* display) { if (!x_shm_) { x_shm_ = ui::AttachSharedMemory(display, key_.shmkey); display_ = display; |