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 3 // found in the LICENSE file. 4 5 #include "cc/resources/resource_update.h" 6 7 #include "base/logging.h" 8 9 namespace cc { 10 Create(PrioritizedResource * resource,const SkBitmap * bitmap,const gfx::Rect & content_rect,const gfx::Rect & source_rect,const gfx::Vector2d & dest_offset)11ResourceUpdate ResourceUpdate::Create(PrioritizedResource* resource, 12 const SkBitmap* bitmap, 13 const gfx::Rect& content_rect, 14 const gfx::Rect& source_rect, 15 const gfx::Vector2d& dest_offset) { 16 CHECK(content_rect.Contains(source_rect)); 17 ResourceUpdate update; 18 update.texture = resource; 19 update.bitmap = bitmap; 20 update.content_rect = content_rect; 21 update.source_rect = source_rect; 22 update.dest_offset = dest_offset; 23 return update; 24 } 25 ResourceUpdate()26ResourceUpdate::ResourceUpdate() 27 : texture(NULL), 28 bitmap(NULL) {} 29 ~ResourceUpdate()30ResourceUpdate::~ResourceUpdate() {} 31 32 } // namespace cc 33