Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: cc/tiles/tile_manager.cc

Issue 1174733003: cc, gpu: Use RGBA when using msaa on systems that don't support BGRA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cc/tiles/tile_manager.h" 5 #include "cc/tiles/tile_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 10
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 if (resource) { 785 if (resource) {
786 // Pass the old tile id here because the tile is solid color so we did not 786 // Pass the old tile id here because the tile is solid color so we did not
787 // raster anything into the tile resource. 787 // raster anything into the tile resource.
788 resource_pool_->ReleaseResource(resource.Pass(), tile->invalidated_id()); 788 resource_pool_->ReleaseResource(resource.Pass(), tile->invalidated_id());
789 } 789 }
790 } else { 790 } else {
791 DCHECK(resource); 791 DCHECK(resource);
792 draw_info.set_use_resource(); 792 draw_info.set_use_resource();
793 draw_info.resource_ = resource.Pass(); 793 draw_info.resource_ = resource.Pass();
794 } 794 }
795 795 draw_info.contents_swizzled_ =
796 tile_task_runner_->GetResourceRequiresSwizzle();
796 client_->NotifyTileStateChanged(tile); 797 client_->NotifyTileStateChanged(tile);
797 } 798 }
798 799
799 ScopedTilePtr TileManager::CreateTile(const gfx::Size& desired_texture_size, 800 ScopedTilePtr TileManager::CreateTile(const gfx::Size& desired_texture_size,
800 const gfx::Rect& content_rect, 801 const gfx::Rect& content_rect,
801 float contents_scale, 802 float contents_scale,
802 int layer_id, 803 int layer_id,
803 int source_frame_number, 804 int source_frame_number,
804 int flags) { 805 int flags) {
805 ScopedTilePtr tile(new Tile(this, desired_texture_size, content_rect, 806 ScopedTilePtr tile(new Tile(this, desired_texture_size, content_rect,
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 result -= other; 1024 result -= other;
1024 return result; 1025 return result;
1025 } 1026 }
1026 1027
1027 bool TileManager::MemoryUsage::Exceeds(const MemoryUsage& limit) const { 1028 bool TileManager::MemoryUsage::Exceeds(const MemoryUsage& limit) const {
1028 return memory_bytes_ > limit.memory_bytes_ || 1029 return memory_bytes_ > limit.memory_bytes_ ||
1029 resource_count_ > limit.resource_count_; 1030 resource_count_ > limit.resource_count_;
1030 } 1031 }
1031 1032
1032 } // namespace cc 1033 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698