Skip to content

Commit

Permalink
Revert "Make BLINK_ANIMATION_USE_TIME_DELTA visible to renderer:blink…
Browse files Browse the repository at this point in the history
…_pch"

This reverts commit b1055de.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Make BLINK_ANIMATION_USE_TIME_DELTA visible to renderer:blink_pch
> 
> There is code in renderer/modules that isn't currently seeing the correct version of AnimationTimeDelta
> third_party/blink/renderer/modules/animationworklet/worklet_animation_test.cc
> 
> blink_unittests was failing to link with precompiled headers enabled.
> 
> 
> Bug: 737867
> Change-Id: I437abd16e2d53a4ef05af8b95fdd01d2b9215a53
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1515682
> Reviewed-by: Stephen McGruer <smcgruer@chromium.org>
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Commit-Queue: Eugene Girard <girard@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#640299}

TBR=girard@chromium.org,thakis@chromium.org,smcgruer@chromium.org

Change-Id: Id2b407be68f4e550131fc6c84dfd7bd67ddeb113
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 737867
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1521146
Reviewed-by: Eugene Girard <girard@chromium.org>
Commit-Queue: Eugene Girard <girard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#640321}
  • Loading branch information
eugenegirard authored and Commit Bot committed Mar 13, 2019
1 parent 1020095 commit 3d03fcc
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 24 deletions.
4 changes: 2 additions & 2 deletions build/buildflag_header.gni
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#
# const char kSpamServerUrl[] = BUILDFLAG(SPAM_SERVER_URL);
#
# There will be no #define called ENABLE_FOO so if you accidentally test for
# that in an ifdef it will always be negative.
# There will no #define called ENABLE_FOO so if you accidentally test for that
# in an ifdef it will always be negative.
#
#
# Template parameters
Expand Down
7 changes: 7 additions & 0 deletions third_party/blink/renderer/core/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ rel_blink_core_gen_dir = rebase_path(blink_core_output_dir, root_build_dir)
# Config for code that builds as part of core.
config("config") {
defines = [ "BLINK_CORE_IMPLEMENTATION=1" ]
if (blink_animation_use_time_delta) {
defines += [ "BLINK_ANIMATION_USE_TIME_DELTA" ]
}
}

config("core_include_dirs") {
Expand Down Expand Up @@ -2262,6 +2265,10 @@ jumbo_source_set("unit_tests") {
if (use_default_render_theme) {
sources += [ "scroll/scrollbar_theme_aura_test.cc" ]
}

if (blink_animation_use_time_delta) {
defines = [ "BLINK_ANIMATION_USE_TIME_DELTA" ]
}
}

jumbo_source_set("perf_tests") {
Expand Down
17 changes: 0 additions & 17 deletions third_party/blink/renderer/core/animation/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/buildflag_header.gni")
import("//third_party/blink/renderer/core/core.gni")

declare_args() {
# Use base::TimeDelta to represent time in renderer/core/animations. See
# http://crbug.com/737867
blink_animation_use_time_delta = false
}

buildflag_header("animation_buildflags") {
header = "buildflags.h"
header_dir = "third_party/blink/renderer/core/animation"

flags = [ "BLINK_ANIMATION_USE_TIME_DELTA=$blink_animation_use_time_delta" ]
}

blink_core_sources("animation") {
split_count = 5
public_deps = [
":animation_buildflags",
]

sources = [
"animatable/animatable_double.cc",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace blink {

#if !BUILDFLAG(BLINK_ANIMATION_USE_TIME_DELTA)
#if !defined(BLINK_ANIMATION_USE_TIME_DELTA)
// Comparison operators on AnimationTimeDelta.
bool CORE_EXPORT operator==(const AnimationTimeDelta& lhs,
const AnimationTimeDelta& rhs) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_ANIMATION_ANIMATION_TIME_DELTA_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_ANIMATION_ANIMATION_TIME_DELTA_H_

#include "third_party/blink/renderer/core/animation/buildflags.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/wtf/allocator.h"

#include <limits>
#include <ostream>

#if !BUILDFLAG(BLINK_ANIMATION_USE_TIME_DELTA)
#if defined(BLINK_ANIMATION_USE_TIME_DELTA)
#include "third_party/blink/renderer/platform/wtf/time.h"
#endif

Expand All @@ -28,7 +27,7 @@ namespace blink {
// double-precision. The second mode uses base::TimeDelta to represent time
// instead.

#if !BUILDFLAG(BLINK_ANIMATION_USE_TIME_DELTA)
#if !defined(BLINK_ANIMATION_USE_TIME_DELTA)

// The double-based version of AnimationTimeDelta. Internally, time is stored as
// double-precision seconds.
Expand Down Expand Up @@ -106,7 +105,7 @@ bool CORE_EXPORT operator<=(const AnimationTimeDelta& lhs,
CORE_EXPORT std::ostream& operator<<(std::ostream& os,
const AnimationTimeDelta& time);

#else // BUILDFLAG(BLINK_ANIMATION_USE_TIME_DELTA)
#else // !defined(BLINK_ANIMATION_USE_TIME_DELTA)

// When compiling in TimeDelta-based mode, AnimationTimeDelta is equivalent to
// base::TimeDelta.
Expand Down
6 changes: 6 additions & 0 deletions third_party/blink/renderer/core/core.gni
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,9 @@ set_defaults("blink_core_tests") {
"//third_party/blink/renderer:inside_blink",
]
}

declare_args() {
# Use base::TimeDelta to represent time in renderer/core/animations. See
# http://crbug.com/737867
blink_animation_use_time_delta = false
}

0 comments on commit 3d03fcc

Please sign in to comment.