OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/common/gpu/client/gl_helper_scaling.h" | 5 #include "content/common/gpu/client/gl_helper_scaling.h" |
6 | 6 |
7 #include <deque> | 7 #include <deque> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/debug/trace_event.h" | 12 #include "base/debug/trace_event.h" |
13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/message_loop.h" | 16 #include "base/message_loop.h" |
17 #include "base/time.h" | 17 #include "base/time/time.h" |
18 #include "third_party/WebKit/public/platform/WebCString.h" | 18 #include "third_party/WebKit/public/platform/WebCString.h" |
19 #include "third_party/skia/include/core/SkRegion.h" | 19 #include "third_party/skia/include/core/SkRegion.h" |
20 #include "ui/gfx/rect.h" | 20 #include "ui/gfx/rect.h" |
21 #include "ui/gfx/size.h" | 21 #include "ui/gfx/size.h" |
22 #include "ui/gl/gl_bindings.h" | 22 #include "ui/gl/gl_bindings.h" |
23 | 23 |
24 using WebKit::WebGLId; | 24 using WebKit::WebGLId; |
25 using WebKit::WebGraphicsContext3D; | 25 using WebKit::WebGraphicsContext3D; |
26 | 26 |
27 namespace content { | 27 namespace content { |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
937 static_cast<float>(dst_size.width()), | 937 static_cast<float>(dst_size.width()), |
938 static_cast<float>(dst_size.height())); | 938 static_cast<float>(dst_size.height())); |
939 | 939 |
940 context_->uniform2f(scaling_vector_location_, | 940 context_->uniform2f(scaling_vector_location_, |
941 scale_x ? 1.0 : 0.0, | 941 scale_x ? 1.0 : 0.0, |
942 scale_x ? 0.0 : 1.0); | 942 scale_x ? 0.0 : 1.0); |
943 context_->uniform4fv(color_weights_location_, 1, color_weights); | 943 context_->uniform4fv(color_weights_location_, 1, color_weights); |
944 } | 944 } |
945 | 945 |
946 } // namespace content | 946 } // namespace content |
OLD | NEW |