mac: Add the flag "-gline-tables-only" to reduce dSYM size. (attempt #2)
[chromium-blink-merge.git] / ui / compositor / paint_cache.cc
blobef0e5a72e874ebe7338ab3a35b4f64c7802d8e69
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ui/compositor/paint_cache.h"
7 #include "cc/resources/display_item_list.h"
8 #include "cc/resources/drawing_display_item.h"
9 #include "ui/compositor/paint_context.h"
11 namespace ui {
13 PaintCache::PaintCache() {
16 PaintCache::~PaintCache() {
19 bool PaintCache::UseCache(const PaintContext& context) {
20 if (!display_item_)
21 return false;
22 DCHECK(context.list_);
23 context.list_->AppendItem(display_item_->Clone());
24 return true;
27 void PaintCache::SetCache(scoped_ptr<cc::DrawingDisplayItem> item) {
28 display_item_ = item.Pass();
31 } // namespace ui