aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpu/SkGpuCanvas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/SkGpuCanvas.cpp')
-rw-r--r--src/gpu/SkGpuCanvas.cpp26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/gpu/SkGpuCanvas.cpp b/src/gpu/SkGpuCanvas.cpp
index 08cbb32..fa57335 100644
--- a/src/gpu/SkGpuCanvas.cpp
+++ b/src/gpu/SkGpuCanvas.cpp
@@ -1,36 +1,26 @@
-/*
- Copyright 2010 Google Inc.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
+/*
+ * Copyright 2010 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
*/
+
#include "GrContext.h"
#include "SkGpuCanvas.h"
#include "SkGpuDevice.h"
-#include "SkGpuDeviceFactory.h"
///////////////////////////////////////////////////////////////////////////////
SkGpuCanvas::SkGpuCanvas(GrContext* context, GrRenderTarget* renderTarget) {
- SkDeviceFactory* factory = SkNEW_ARGS(SkGpuDeviceFactory,
- (context, renderTarget));
- this->setDeviceFactory(factory)->unref();
-
SkASSERT(context);
fContext = context;
fContext->ref();
+
+ this->setDevice(new SkGpuDevice(context, renderTarget))->unref();
}
SkGpuCanvas::~SkGpuCanvas() {