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

Side by Side Diff: webkit/compositor_bindings/web_nine_patch_layer_impl.cc

Issue 12496013: Move compositor bindings implementations out of WebKit::, fix style (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
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 "webkit/compositor_bindings/web_nine_patch_layer_impl.h"
6
7 #include "cc/layers/nine_patch_layer.h"
8 #include "third_party/skia/include/core/SkBitmap.h"
9 #include "ui/gfx/rect.h"
10 #include "webkit/compositor_bindings/web_layer_impl.h"
11
12 using cc::NinePatchLayer;
13
14 namespace WebKit {
15
16 WebNinePatchLayerImpl::WebNinePatchLayerImpl()
17 : layer_(new WebLayerImpl(NinePatchLayer::Create())) {
18 layer_->layer()->SetIsDrawable(true);
19 }
20
21 WebNinePatchLayerImpl::~WebNinePatchLayerImpl() {}
22
23 WebLayer* WebNinePatchLayerImpl::layer() { return layer_.get(); }
24
25 void WebNinePatchLayerImpl::setBitmap(const SkBitmap& bitmap,
26 const WebRect& aperture) {
27 static_cast<NinePatchLayer*>(layer_->layer())->SetBitmap(bitmap,
28 gfx::Rect(aperture));
29 }
30
31 } // namespace WebKit
OLDNEW
« no previous file with comments | « webkit/compositor_bindings/web_nine_patch_layer_impl.h ('k') | webkit/compositor_bindings/web_rendering_stats_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698