mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Change ALLOW_UNUSED to ALLOW_UNUSED_TYPE and ALLOW_UNUSED_LOCAL to match Chromium.
- Windows: d3dcompiler_46.dll changed to d3dcompiler_47.dll due to 8.1 SDK update (issue #1484). - Windows: Fix `local variable is initialized but not referenced` warning with Release build (issue #1484). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1962 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -437,7 +437,7 @@ if(OS_WINDOWS)
|
|||||||
# List of CEF binary files.
|
# List of CEF binary files.
|
||||||
set(CEF_BINARY_FILES
|
set(CEF_BINARY_FILES
|
||||||
d3dcompiler_43.dll
|
d3dcompiler_43.dll
|
||||||
d3dcompiler_46.dll
|
d3dcompiler_47.dll
|
||||||
ffmpegsumo.dll
|
ffmpegsumo.dll
|
||||||
libcef.dll
|
libcef.dll
|
||||||
libEGL.dll
|
libEGL.dll
|
||||||
|
@ -160,18 +160,26 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif // WARN_UNUSED_RESULT
|
#endif // WARN_UNUSED_RESULT
|
||||||
|
|
||||||
|
// Annotate a typedef or function indicating it's ok if it's not used.
|
||||||
|
// Use like:
|
||||||
|
// typedef Foo Bar ALLOW_UNUSED_TYPE;
|
||||||
|
#ifndef ALLOW_UNUSED_TYPE
|
||||||
|
#if defined(COMPILER_GCC)
|
||||||
|
#define ALLOW_UNUSED_TYPE __attribute__((unused))
|
||||||
|
#else
|
||||||
|
#define ALLOW_UNUSED_TYPE
|
||||||
|
#endif
|
||||||
|
#endif // ALLOW_UNUSED_TYPE
|
||||||
|
|
||||||
// Annotate a variable indicating it's ok if the variable is not used.
|
// Annotate a variable indicating it's ok if the variable is not used.
|
||||||
// (Typically used to silence a compiler warning when the assignment
|
// (Typically used to silence a compiler warning when the assignment
|
||||||
// is important for some other reason.)
|
// is important for some other reason.)
|
||||||
// Use like:
|
// Use like:
|
||||||
// int x ALLOW_UNUSED = ...;
|
// int x = ...;
|
||||||
#ifndef ALLOW_UNUSED
|
// ALLOW_UNUSED_LOCAL(x);
|
||||||
#if defined(COMPILER_GCC)
|
#ifndef ALLOW_UNUSED_LOCAL
|
||||||
#define ALLOW_UNUSED __attribute__((unused))
|
#define ALLOW_UNUSED_LOCAL(x) false ? (void)x : (void)0
|
||||||
#else
|
|
||||||
#define ALLOW_UNUSED
|
|
||||||
#endif
|
#endif
|
||||||
#endif // ALLOW_UNUSED
|
|
||||||
|
|
||||||
#endif // !BUILDING_CEF_SHARED
|
#endif // !BUILDING_CEF_SHARED
|
||||||
|
|
||||||
|
@ -165,7 +165,8 @@ struct CompileAssert {
|
|||||||
} // namespace cef
|
} // namespace cef
|
||||||
|
|
||||||
#define COMPILE_ASSERT(expr, msg) \
|
#define COMPILE_ASSERT(expr, msg) \
|
||||||
typedef cef::CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] ALLOW_UNUSED
|
typedef cef::CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] \
|
||||||
|
ALLOW_UNUSED_TYPE
|
||||||
|
|
||||||
// Implementation details of COMPILE_ASSERT:
|
// Implementation details of COMPILE_ASSERT:
|
||||||
//
|
//
|
||||||
|
@ -6,15 +6,11 @@
|
|||||||
#include "libcef/browser/browser_host_impl.h"
|
#include "libcef/browser/browser_host_impl.h"
|
||||||
#include "libcef/browser/window_x11.h"
|
#include "libcef/browser/window_x11.h"
|
||||||
|
|
||||||
|
#include "base/compiler_specific.h"
|
||||||
#include "base/strings/string_util.h"
|
#include "base/strings/string_util.h"
|
||||||
#include "ui/aura/window.h"
|
#include "ui/aura/window.h"
|
||||||
#include "ui/gfx/point.h"
|
#include "ui/gfx/point.h"
|
||||||
|
|
||||||
// Used to silence warnings about unused variables.
|
|
||||||
#if !defined(UNUSED)
|
|
||||||
#define UNUSED(x) ((void)(x))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
CefMenuCreatorRunnerLinux::CefMenuCreatorRunnerLinux() {
|
CefMenuCreatorRunnerLinux::CefMenuCreatorRunnerLinux() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +55,7 @@ bool CefMenuCreatorRunnerLinux::RunContextMenu(CefMenuCreator* manager) {
|
|||||||
NULL, gfx::Rect(screen_point, gfx::Size()),
|
NULL, gfx::Rect(screen_point, gfx::Size()),
|
||||||
views::MENU_ANCHOR_TOPRIGHT,
|
views::MENU_ANCHOR_TOPRIGHT,
|
||||||
ui::MENU_SOURCE_NONE);
|
ui::MENU_SOURCE_NONE);
|
||||||
UNUSED(result);
|
ALLOW_UNUSED_LOCAL(result);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -10,12 +10,9 @@
|
|||||||
#include "libcef/browser/browser_host_impl.h"
|
#include "libcef/browser/browser_host_impl.h"
|
||||||
#include "libcef/browser/text_input_client_osr_mac.h"
|
#include "libcef/browser/text_input_client_osr_mac.h"
|
||||||
|
|
||||||
|
#include "base/compiler_specific.h"
|
||||||
#include "ui/events/latency_info.h"
|
#include "ui/events/latency_info.h"
|
||||||
|
|
||||||
#if !defined(UNUSED)
|
|
||||||
#define UNUSED(x) ((void)(x)) /* to avoid warnings */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
CefTextInputClientOSRMac* GetInputClientFromContext(
|
CefTextInputClientOSRMac* GetInputClientFromContext(
|
||||||
@ -310,7 +307,7 @@ void CefRenderWidgetHostViewOSR::PlatformDestroyCompositorWidget() {
|
|||||||
|
|
||||||
// Compositor is owned by and will be freed by BrowserCompositorMac.
|
// Compositor is owned by and will be freed by BrowserCompositorMac.
|
||||||
ui::Compositor* compositor = compositor_.release();
|
ui::Compositor* compositor = compositor_.release();
|
||||||
UNUSED(compositor);
|
ALLOW_UNUSED_LOCAL(compositor);
|
||||||
|
|
||||||
[window_ close];
|
[window_ close];
|
||||||
window_ = nil;
|
window_ = nil;
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include <windowsx.h>
|
#include <windowsx.h>
|
||||||
|
|
||||||
#include "include/base/cef_bind.h"
|
#include "include/base/cef_bind.h"
|
||||||
|
#include "include/base/cef_build.h"
|
||||||
#include "include/wrapper/cef_closure_task.h"
|
#include "include/wrapper/cef_closure_task.h"
|
||||||
#include "cefclient/resource.h"
|
#include "cefclient/resource.h"
|
||||||
|
|
||||||
@ -18,6 +19,7 @@ class ScopedGLContext {
|
|||||||
: hdc_(hdc),
|
: hdc_(hdc),
|
||||||
swap_buffers_(swap_buffers) {
|
swap_buffers_(swap_buffers) {
|
||||||
BOOL result = wglMakeCurrent(hdc, hglrc);
|
BOOL result = wglMakeCurrent(hdc, hglrc);
|
||||||
|
ALLOW_UNUSED_LOCAL(result);
|
||||||
DCHECK(result);
|
DCHECK(result);
|
||||||
}
|
}
|
||||||
~ScopedGLContext() {
|
~ScopedGLContext() {
|
||||||
@ -352,6 +354,7 @@ void OSRWindow::DisableGL() {
|
|||||||
if (IsWindow(hWnd_)) {
|
if (IsWindow(hWnd_)) {
|
||||||
// wglDeleteContext will make the context not current before deleting it.
|
// wglDeleteContext will make the context not current before deleting it.
|
||||||
BOOL result = wglDeleteContext(hRC_);
|
BOOL result = wglDeleteContext(hRC_);
|
||||||
|
ALLOW_UNUSED_LOCAL(result);
|
||||||
DCHECK(result);
|
DCHECK(result);
|
||||||
ReleaseDC(hWnd_, hDC_);
|
ReleaseDC(hWnd_, hDC_);
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ Optional components:
|
|||||||
|
|
||||||
* Angle and Direct3D support
|
* Angle and Direct3D support
|
||||||
d3dcompiler_43.dll (required for Windows XP)
|
d3dcompiler_43.dll (required for Windows XP)
|
||||||
d3dcompiler_46.dll (required for Windows Vista and newer)
|
d3dcompiler_47.dll (required for Windows Vista and newer)
|
||||||
libEGL.dll
|
libEGL.dll
|
||||||
libGLESv2.dll
|
libGLESv2.dll
|
||||||
Note: Without these components HTML5 accelerated content like 2D canvas, 3D
|
Note: Without these components HTML5 accelerated content like 2D canvas, 3D
|
||||||
|
@ -418,7 +418,7 @@ if mode == 'standard':
|
|||||||
|
|
||||||
if platform == 'windows':
|
if platform == 'windows':
|
||||||
binaries = [
|
binaries = [
|
||||||
'd3dcompiler_46.dll',
|
'd3dcompiler_47.dll',
|
||||||
'ffmpegsumo.dll',
|
'ffmpegsumo.dll',
|
||||||
'libcef.dll',
|
'libcef.dll',
|
||||||
'libEGL.dll',
|
'libEGL.dll',
|
||||||
|
Reference in New Issue
Block a user