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 "gpu/command_buffer/service/texture_manager.h" | 5 #include "gpu/command_buffer/service/texture_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bits.h" | 10 #include "base/bits.h" |
(...skipping 1700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1711 texture_ref, | 1711 texture_ref, |
1712 args.target, args.level, args.internal_format, args.width, args.height, | 1712 args.target, args.level, args.internal_format, args.width, args.height, |
1713 1, args.border, args.format, args.type, args.pixels != NULL); | 1713 1, args.border, args.format, args.type, args.pixels != NULL); |
1714 texture_state->tex_image_2d_failed = false; | 1714 texture_state->tex_image_2d_failed = false; |
1715 } | 1715 } |
1716 } | 1716 } |
1717 | 1717 |
1718 ScopedTextureUploadTimer::ScopedTextureUploadTimer( | 1718 ScopedTextureUploadTimer::ScopedTextureUploadTimer( |
1719 DecoderTextureState* texture_state) | 1719 DecoderTextureState* texture_state) |
1720 : texture_state_(texture_state), | 1720 : texture_state_(texture_state), |
1721 begin_time_(base::TimeTicks::HighResNow()) { | 1721 begin_time_(base::TimeTicks::Now()) { |
1722 } | 1722 } |
1723 | 1723 |
1724 ScopedTextureUploadTimer::~ScopedTextureUploadTimer() { | 1724 ScopedTextureUploadTimer::~ScopedTextureUploadTimer() { |
1725 texture_state_->texture_upload_count++; | 1725 texture_state_->texture_upload_count++; |
1726 texture_state_->total_texture_upload_time += | 1726 texture_state_->total_texture_upload_time += |
1727 base::TimeTicks::HighResNow() - begin_time_; | 1727 base::TimeTicks::Now() - begin_time_; |
1728 } | 1728 } |
1729 | 1729 |
1730 } // namespace gles2 | 1730 } // namespace gles2 |
1731 } // namespace gpu | 1731 } // namespace gpu |
OLD | NEW |